RX Family
ADC Module Using Firmware Integration Technology
R01AN1666EJ0220 Rev. 2.20
Page 55 of 74
Dec 01, 2016
An example template for a callback function is provided here:
void MyCallback(void *p_args)
{
adc_cb_args_t *args;
args = (adc_cb_args_t *)p_args;
if (args->event == ADC_EVT_SCAN_COMPLETE)
{
// Read results here
nop();
}
else if (args->event == ADC_EVT_GROUPB_SCAN_COMPLETE)
{
// Read Group B results here
nop();
}
else if (args->event == ADC_EVT_CONDITION_MET)
{
// Process chans/sensors indicated in args->compare_flags
nop();
}
}
Special Notes (RX 63x):
Even if register automatic clearing is enabled for temperature sensor output or internal reference voltage, the
A/D conversion result is not cleared.
After the R_ADC_Open function is executed, wait at least 10 ms before executing A/D conversion.
Special Notes (RX110/RX111/RX113/RX210/RX130/RX230/RX231/RX65x/RX64M/RX71M):
After the R_ADC_Open function is executed, wait at least 1 µs before executing A/D conversion.