105 int ADC_Init(
unsigned divisor,
const sys_cfg_adc_t* sys_cfg);
113 void ADC_StartConvert(mxc_adc_chsel_t channel,
unsigned int adc_scale,
unsigned int ref_scale);
134 int ADC_SetLimit(mxc_adc_limitsel_t unit, mxc_adc_chsel_t channel,
unsigned int low_enable,
135 unsigned int low_limit,
unsigned int high_enable,
unsigned int high_limit);
uint32_t ADC_GetFlags(void)
Get interrupt flags.
void ADC_StartConvert(mxc_adc_chsel_t channel, unsigned int adc_scale, unsigned int ref_scale)
Start ADC conversion on the selected channel.
#define MXC_V_ADC_CTRL_CH_SEL_VCOREB
CTRL_CH_SEL_VCOREB Value.
Definition: adc_regs.h:157
void ADC_DisableINT(uint32_t mask)
Disable ADC interrupts based on mask.
#define MXC_V_ADC_CTRL_CH_SEL_AIN2
CTRL_CH_SEL_AIN2 Value.
Definition: adc_regs.h:143
#define MXC_V_ADC_CTRL_CH_SEL_VDDIOH
CTRL_CH_SEL_VDDIOH Value.
Definition: adc_regs.h:169
#define MXC_V_ADC_CTRL_CH_SEL_AIN6
CTRL_CH_SEL_AIN6 Value.
Definition: adc_regs.h:151
int ADC_GetData(uint16_t *outdata)
Gets the result from the previous ADC conversion.
#define MXC_V_ADC_CTRL_CH_SEL_AIN7
CTRL_CH_SEL_AIN7 Value.
Definition: adc_regs.h:153
void ADC_ClearFlags(uint32_t mask)
Clear interrupt flag(s) using the mask parameter.
#define MXC_V_ADC_CTRL_CH_SEL_VRXOUT
CTRL_CH_SEL_VRXOUT Value.
Definition: adc_regs.h:159
mxc_adc_chsel_t
Enumeration type for the ADC Input Channels.
Definition: adc.h:65
#define MXC_V_ADC_CTRL_CH_SEL_VDDIO
CTRL_CH_SEL_VDDIO Value.
Definition: adc_regs.h:167
#define MXC_V_ADC_CTRL_CH_SEL_VDDB
CTRL_CH_SEL_VDDB Value.
Definition: adc_regs.h:165
void ADC_EnableINT(uint32_t mask)
Enables the ADC interrupts specified by the mask parameter.
#define MXC_V_ADC_CTRL_CH_SEL_AIN1
CTRL_CH_SEL_AIN1 Value.
Definition: adc_regs.h:141
#define MXC_V_ADC_CTRL_CH_SEL_VREGI
CTRL_CH_SEL_VREGI Value.
Definition: adc_regs.h:171
#define MXC_V_ADC_CTRL_CH_SEL_AIN3
CTRL_CH_SEL_AIN3 Value.
Definition: adc_regs.h:145
#define MXC_V_ADC_CTRL_CH_SEL_AIN0
CTRL_CH_SEL_AIN0 Value.
Definition: adc_regs.h:139
#define MXC_V_ADC_CTRL_CH_SEL_VCOREA
CTRL_CH_SEL_VCOREA Value.
Definition: adc_regs.h:155
#define MXC_V_ADC_CTRL_CH_SEL_AIN5
CTRL_CH_SEL_AIN5 Value.
Definition: adc_regs.h:149
int ADC_Init(unsigned divisor, const sys_cfg_adc_t *sys_cfg)
Initialize the ADC hardware.
#define MXC_V_ADC_CTRL_CH_SEL_VTXOUT
CTRL_CH_SEL_VTXOUT Value.
Definition: adc_regs.h:161
#define MXC_V_ADC_CTRL_CH_SEL_AIN4
CTRL_CH_SEL_AIN4 Value.
Definition: adc_regs.h:147
#define MXC_V_ADC_CTRL_CH_SEL_VDDA
CTRL_CH_SEL_VDDA Value.
Definition: adc_regs.h:163
uint32_t ADC_GetStatus(void)
Get the Status of the ADC.
int ADC_SetLimit(mxc_adc_limitsel_t unit, mxc_adc_chsel_t channel, unsigned int low_enable, unsigned int low_limit, unsigned int high_enable, unsigned int high_limit)
Set the data limits for an ADC channel monitor.
mxc_adc_limitsel_t
Enumeration type for the ADC limit register to set.
Definition: adc.h:88