Tool/software: Code Composer Studio
hello,
i am a newbie to microcontroller. i am working over software driver mode. when implemeinting adc, i found the following type of intialisation in a source file. am unable to understand this
Please help me
void ADC_setVoltRefSrc(ADC_Handle adcHandle, const ADC_VoltageRefSrc_e voltSrc)
{
ADC_Obj *adc = (ADC_Obj *)adcHandle;
ENABLE_PROTECTED_REGISTER_WRITE_MODE;
// clear the bits
adc->ADCCTL1 &= (~ADC_ADCCTL1_ADCREFSEL_BITS);
// set the bits
adc->ADCCTL1 |= voltSrc;
DISABLE_PROTECTED_REGISTER_WRITE_MODE;
return;
} // end of ADC_setVoltRefSrc() function
Thank you