RX Family
ADC Module Using Firmware Integration Technology
R01AN1666EJ0220 Rev. 2.20
Page 36 of 74
Dec 01, 2016
} adc_data_t;
2.10.9
RX63x Interface Types (r_s12ad_rx63x_if.h)
/* ADC_OPEN() ARGUMENT DEFINITIONS */
typedef
enum
e_adc_mode
{
ADC_MODE_SS_TEMPERATURE, // single scan temperature sensor
ADC_MODE_SS_INT_REF_VOLT, // single scan internal ref voltage sensor
ADC_MODE_SS_ONE_CH, // single scan one channel
ADC_MODE_SS_MULTI_CH, // 1 trigger source, scan multiple channels
ADC_MODE_CONT_ONE_CH, // continuous scan one channel
ADC_MODE_CONT_MULTI_CH, // continuous scan multiple channels
ADC_MODE_MAX
// This definition DO NOT USE for R_ADC_Open() argument
}
adc_mode_t;
typedef
enum
e_adc_trig // trigger sources (set to ADSTRS bit)
{
ADC_TRIG_ASYNC_ADTRG = 0, // ADTRG#0
ADC_TRIG_SYNC_TRG0AN = 1, // MTU0 TRGA
ADC_TRIG_SYNC_TRG0BN = 2, // MTU0 TRGB
ADC_TRIG_SYNC_TRGAN = 3, // MTUx TRGA
ADC_TRIG_SYNC_TPUTRGAN = 4, // TPUx TRGA
ADC_TRIG_SYNC_TRG0EN = 5, // MTU0 TRGE
ADC_TRIG_SYNC_TRG0FN = 6, // MTU0 TRGF
ADC_TRIG_SYNC_TRG4AN_OR_TRG4BN = 7, // MTU4 TADCORA or MTU4 TADCORB
ADC_TRIG_SYNC_TPUTRG0AN = 8, // TPU0 TRGA
ADC_TRIG_SYNC_TMRTRG0AN = 9, // TMR0 TCORA
ADC_TRIG_SYNC_TMRTRG2AN = 10, // TMR2 TCORA
ADC_TRIG_SOFTWARE = 16 // software trigger(This is not set to ADSTRS)
}
adc_trig_t;
typedef
enum
e_adc_add
{
ADC_ADD_OFF =
0
, // addition is turned off for chans/sensors
ADC_ADD_TWO_SAMPLES =
1
,
ADC_ADD_THREE_SAMPLES =
2
,
ADC_ADD_FOUR_SAMPLES =
3
}
adc_add_t;
typedef
enum
e_adc_align
{
ADC_ALIGN_RIGHT =
0x0000
,
ADC_ALIGN_LEFT =
0x8000
}
adc_align_t;
typedef
enum
e_adc_clear
{
ADC_CLEAR_AFTER_READ_OFF =
0x0000
,
ADC_CLEAR_AFTER_READ_ON =
0x0020
}
adc_clear_t;
typedef
enum
e_adc_speed
{
ADC_CONVERT_SPEED_PCLK_DIV8 =
0x00
,
ADC_CONVERT_SPEED_PCLK_DIV4 =
0x01
,
ADC_CONVERT_SPEED_PCLK_DIV2 =
0x02
,
ADC_CONVERT_SPEED_PCLK =
0x03
}
adc_speed_t;