Other Parts Discussed in Thread: MOTORWARE
Hi,
the following code in Motorware may have an ordering issue
static inline bool ADC_getIntFlag(ADC_Handle adcHandle,const ADC_IntNumber_e intNumber)
{
ADC_Obj *adc = (ADC_Obj *)adcHandle;
bool status;
// check the status of the bit
status = (bool)( adc->ADCINTFLG & (1 << intNumber) >> intNumber ); //GHS--- questionable, seems to only work for ADCINT1
return(status);
} // end of ADC_getIntFlag() function
This does not work for intNumber=1, it works for intNumber=0.
Changing to this works for both ADCINT1 (intNumber=0) and ADCINT2 (intNumber=1)
status = (bool)( (adc->ADCINTFLG & (1 << intNumber)) >> intNumber );
Regards,
--Gunter