Hi omkardixit:
We get the real attribute value through API _lwad_read_raw()
mqx/source/io/lwadc/lwadc_vadc.c
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name : _lwadc_read_raw
* Returned Value : TRUE for success, FALSE for failure
* Comments :
* This function Read the current value of the ADC input and return
* the result without applying any scaling.
*
*END*----------------------------------------------------------------------*/
bool _lwadc_read_raw(LWADC_STRUCT_PTR lwadc_ptr, LWADC_VALUE_PTR outSample)
{
ADC_MemMapPtr adc_ptr;
LWADC_VALUE sample;
if (NULL == lwadc_ptr){
return FALSE;
}
if (lwadc_ptr->context_ptr == NULL) {
return FALSE;
}
adc_ptr = lwadc_ptr->context_ptr->adc_ptr;
if ((adc_ptr->GC & ADC_GC_ADCO_MASK) == 0) {
/* ADC is not in continuous mode. */
adc_ptr->GC |= ADC_GC_ADCO_MASK;
}
sample = adc_ptr->R[0];
*outSample = sample & ADC_CDR_CDATA_MASK;
return TRUE;
}
Regards
Daniel