xadcps: modify inputs for assert function

Provide correct condition for assert function

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Acked-by: Srikanth Vemula <svemula@xilinx.com>
This commit is contained in:
Subbaraya Sundeep Bhatta 2014-08-05 14:24:22 +05:30 committed by Jagannadha Sutradharudu Teki
parent 374fbecdb5
commit b6759337df
2 changed files with 22 additions and 3 deletions

View file

@ -51,6 +51,8 @@
* 1.01a bss 02/18/13 Modified XAdcPs_SetSeqChEnables,XAdcPs_SetSeqAvgEnables
* XAdcPs_SetSeqInputMode and XAdcPs_SetSeqAcqTime APIs
* to fix CR #693371
* 2.1 bss 08/05/14 Modified Assert for XAdcPs_SetSingleChParams to fix
* CR #807563.
* </pre>
*
*****************************************************************************/
@ -537,7 +539,7 @@ u8 XAdcPs_GetAvg(XAdcPs *InstancePtr)
*
* @param InstancePtr is a pointer to the XAdcPs instance.
* @param Channel is the channel number for the singel channel mode.
* The valid channels are 0 to 5, 8, and 16 to 31.
* The valid channels are 0 to 6, 8, and 13 to 31.
* If the external Mux is used then this specifies the channel
* oonnected to the external Mux. Please read the Device Spec
* to know which channels are valid.
@ -580,9 +582,9 @@ int XAdcPs_SetSingleChParams(XAdcPs *InstancePtr,
*/
Xil_AssertNonvoid(InstancePtr != NULL);
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertNonvoid((Channel <= XADCPS_CH_VREFN) ||
Xil_AssertNonvoid((Channel <= XADCPS_CH_VBRAM) ||
(Channel == XADCPS_CH_ADC_CALIB) ||
((Channel >= XADCPS_CH_AUX_MIN) &&
((Channel >= XADCPS_CH_VCCPINT) &&
(Channel <= XADCPS_CH_AUX_MAX)));
Xil_AssertNonvoid((IncreaseAcqCycles == TRUE) ||
(IncreaseAcqCycles == FALSE));

View file

@ -159,6 +159,13 @@
* in xadcps.c to fix CR #693371
* 1.03a bss 11/01/13 Modified xadcps_hw.h to use correct Register offsets
* CR#749687
* 2.1 bss 08/05/14 Added declarations for XAdcPs_SetSequencerEvent,
* XAdcPs_GetSamplingMode, XAdcPs_SetMuxMode,
* XAdcPs_SetPowerdownMode and XAdcPs_GetPowerdownMode
* functions.
* Modified Assert for XAdcPs_SetSingleChParams in
* xadcps.c to fix CR #807563.
*
* </pre>
*
*****************************************************************************/
@ -536,6 +543,16 @@ u16 XAdcPs_GetAlarmThreshold(XAdcPs *InstancePtr, u8 AlarmThrReg);
void XAdcPs_EnableUserOverTemp(XAdcPs *InstancePtr);
void XAdcPs_DisableUserOverTemp(XAdcPs *InstancePtr);
void XAdcPs_SetSequencerEvent(XAdcPs *InstancePtr, int IsEventMode);
int XAdcPs_GetSamplingMode(XAdcPs *InstancePtr);
void XAdcPs_SetMuxMode(XAdcPs *InstancePtr, int MuxMode, u8 Channel);
void XAdcPs_SetPowerdownMode(XAdcPs *InstancePtr, u32 Mode);
u32 XAdcPs_GetPowerdownMode(XAdcPs *InstancePtr);
/**
* Functions in xadcps_selftest.c
*/