![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Modules | |
ADC_Registers | |
Registers, Bit Masks and Bit Positions for the ADC Peripheral Module. | |
Enumerations | |
enum | mxc_adc_chsel_t { ADC_CH_0 = MXC_V_ADC_CTRL_CH_SEL_AIN0, ADC_CH_1 = MXC_V_ADC_CTRL_CH_SEL_AIN1, ADC_CH_2 = MXC_V_ADC_CTRL_CH_SEL_AIN2, ADC_CH_3 = MXC_V_ADC_CTRL_CH_SEL_AIN3, ADC_CH_4 = MXC_V_ADC_CTRL_CH_SEL_AIN4, ADC_CH_5 = MXC_V_ADC_CTRL_CH_SEL_AIN5, ADC_CH_6 = MXC_V_ADC_CTRL_CH_SEL_AIN6, ADC_CH_7 = MXC_V_ADC_CTRL_CH_SEL_AIN7, ADC_CH_VCOREA = MXC_V_ADC_CTRL_CH_SEL_VCOREA, ADC_CH_VCOREB = MXC_V_ADC_CTRL_CH_SEL_VCOREB, ADC_CH_VRXOUT = MXC_V_ADC_CTRL_CH_SEL_VRXOUT, ADC_CH_VTXOUT = MXC_V_ADC_CTRL_CH_SEL_VTXOUT, ADC_CH_VDDA = MXC_V_ADC_CTRL_CH_SEL_VDDA, ADC_CH_VDDB = MXC_V_ADC_CTRL_CH_SEL_VDDB, ADC_CH_VDDIO = MXC_V_ADC_CTRL_CH_SEL_VDDIO, ADC_CH_VDDIOH = MXC_V_ADC_CTRL_CH_SEL_VDDIOH, ADC_CH_VREGI = MXC_V_ADC_CTRL_CH_SEL_VREGI } |
Enumeration type for the ADC Input Channels. | |
enum | mxc_adc_limitsel_t { ADC_LIMIT_0, ADC_LIMIT_1, ADC_LIMIT_2, ADC_LIMIT_3, ADC_LIMIT_MAX } |
Enumeration type for the ADC limit register to set. | |
Functions | |
int | ADC_Init (unsigned divisor, const sys_cfg_adc_t *sys_cfg) |
Initialize the ADC hardware. More... | |
void | ADC_StartConvert (mxc_adc_chsel_t channel, unsigned int adc_scale, unsigned int ref_scale) |
Start ADC conversion on the selected channel. More... | |
int | ADC_GetData (uint16_t *outdata) |
Gets the result from the previous ADC conversion. More... | |
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. More... | |
uint32_t | ADC_GetFlags (void) |
Get interrupt flags. More... | |
void | ADC_ClearFlags (uint32_t mask) |
Clear interrupt flag(s) using the mask parameter. More... | |
uint32_t | ADC_GetStatus (void) |
Get the Status of the ADC. More... | |
void | ADC_EnableINT (uint32_t mask) |
Enables the ADC interrupts specified by the mask parameter. More... | |
void | ADC_DisableINT (uint32_t mask) |
Disable ADC interrupts based on mask. More... | |
int ADC_Init | ( | unsigned | divisor, |
const sys_cfg_adc_t * | sys_cfg | ||
) |
divisor | The divisor |
sys_cfg | System Configuration Object |
void ADC_StartConvert | ( | mxc_adc_chsel_t | channel, |
unsigned int | adc_scale, | ||
unsigned int | ref_scale | ||
) |
channel | Channel select from mxc_adc_chsel_t |
adc_scale | Enable the ADC input scaling mode if non-zero |
ref_scale | The reference scale |
int ADC_GetData | ( | uint16_t * | outdata | ) |
outdata | Pointer to store the ADC data conversion result |
outdata
parameter 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 | ||
) |
unit | Which data limit unit to configure |
channel | Channel select from mxc_adc_chsel_t |
low_enable | Enable the lower limit on this monitor |
low_limit | Value for lower limit monitor |
high_enable | Enable the upper limit on this monitor |
high_limit | Value for upper limit monitor |
uint32_t ADC_GetFlags | ( | void | ) |
void ADC_ClearFlags | ( | uint32_t | mask | ) |
All bits set in the parameter will be cleared
mask | Interrupt flags to clear. See the ADC_INTR Register for the interrupt flag masks |
uint32_t ADC_GetStatus | ( | void | ) |
void ADC_EnableINT | ( | uint32_t | mask | ) |
mask | ADC interrupts to enable. See ADC_INTR Register for the interrupt enable bit masks. |
void ADC_DisableINT | ( | uint32_t | mask | ) |
mask | ADC interrupts to disable. See ADC_INTR Register for the interrupt enable bit masks. |