This section provides a pseudocode for the host initialization and configuration example, of the ADC channels.
- Set the pin type as ADC for the required pin.
PinTypeADC(PIN_58, 0xFF) - Enable the ADC channel ADCChannel.
Enable(ADC_BASE, ADC_CH_1) - Optionally configure internal timer for time-stamping.
ADCTimerConfig(ADC_BASE, 2^17)
ADCTimerEnable(ADC_BASE) - Enable the ADC module.
ADCEnable(ADC_BASE) - Read out the ADC samples using the code that follows:
if( ADCFIFOLvlGet(ADC_BASE, ADC_CH_1) )
{
ulSample = ADCFIFORead(ADC_BASE, ADC_CH_1)
}