User`s manual

RX62N Group, RX621 Group 4. Library Reference
Program example
/* RPDL definitions */
#include "r_pdl_adc_10.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
/* ADC unit 1 callback function */
void ADC1IntFunc(void){}
void func(void)
{
/* Set up ADC 1 at 48 MHz in single mode using AN1 with 0.6
µs sampling
time */
R_ADC_10_Create(
1,
PDL_ADC_10_CHANNELS_OPTION_2,
48E6,
0.6E-6,
ADC1IntFunc,
2
);
/* Set up ADC 1 at 48 MHz in single mode using AN1 */
R_ADC_10_Create(
1,
PDL_ADC_10_CHANNELS_OPTION_2 | PDL_ADC_10_ADSSTR_SPECIFY,
48E6,
0x40,
ADC1IntFunc,
2
);
}
R20UT0084EE0112 Rev.1.12 Page 4-224
July. 16, 2014