RX Family
ADC Module Using Firmware Integration Technology
R01AN1666EJ0220 Rev. 2.20
Page 44 of 74
Dec 01, 2016
ADC_REG_MAX = ADC_REG_SELF_DIAG
}
adc_reg_t;
#define
ADC_0_REG_ARRAY_MAX (
8
)
#define
ADC_1_REG_ARRAY_MAX (
21
)
/* ADC_READALL() ARGUMENT DEFINITIONS */
typedef
struct
st_adc_unit0_data
{
uint16_t chan
[
ADC_0_REG_ARRAY_MAX
]
;
uint16_t dbltrig;
uint16_t dbltrigA;
uint16_t dbltrigB;
uint16_t self_diag;
}
adc_unit0_data_t;
typedef
struct
st_adc_unit1_data
{
uint16_t chan
[
ADC_1_REG_ARRAY_MAX
]
;
uint16_t temp;
uint16_t volt;
uint16_t dbltrig;
uint16_t dbltrigA;
uint16_t dbltrigB;
uint16_t self_diag;
}
adc_unit1_data_t;
typedef
struct
st_adc_data
{
adc_unit0_data_t unit0;
adc_unit1_data_t unit1;
}
adc_data_t;
2.10.11 RX65x Interface Types ( r_s12ad_rx65x_if.h )
/* ADC_OPEN() ARGUMENT DEFINITIONS */
typedef
enum
e_adc_mode
{
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_SS_ONE_CH_DBLTRIG,
// on even triggers save to ADDBLDR & int
ADC_MODE_SS_MULTI_CH_GROUPED,
// 2 trigger sources, scan multiple channels
ADC_MODE_SS_MULTI_CH_GROUPED_GROUPC,
// 3 trigger sources, scan multiple
// channels
ADC_MODE_SS_MULTI_CH_GROUPED_DBLTRIG_A,
ADC_MODE_SS_MULTI_CH_GROUPED_DBLTRIG_A_GROUPC,
ADC_MODE_MAX
// This definition DO NOT USE for R_ADC_Open() argument
}
adc_mode_t;
typedef
enum
e_adc_res
{
ADC_RESOLUTION_12_BIT =
0
,
// 13 ADCLKs conversion (15 self diagnosis)
ADC_RESOLUTION_10_BIT =
1
,
// 11 ADCLKs conversion (13 self diagnosis)
ADC_RESOLUTION_8_BIT =
2
,
// 9 ADCLKs conversion (11 self diagnosis)
ADC_RESOLUTION_END_ENUM
}
adc_res_t ;
typedef
enum
e_adc_align