![]() |
Mini51 BSP
V3.02.002
The Board Support Package for Mini51 Series
|
Mini51 series ADC driver header file. More...
Go to the source code of this file.
Macros | |
#define | ADC_CH7_EXT (0UL) |
#define | ADC_CH7_BGP (ADC_ADCHER_PRESEL_Msk) |
#define | ADC_CMP_LESS_THAN (0UL) |
#define | ADC_CMP_GREATER_OR_EQUAL_TO (ADC_ADCMPR_CMPCOND_Msk) |
#define | ADC_TRIGGER_BY_EXT_PIN (0UL) |
#define | ADC_TRIGGER_BY_PWM (ADC_ADCR_TRGS_Msk) |
#define | ADC_FALLING_EDGE_TRIGGER (0UL) |
#define | ADC_RISING_EDGE_TRIGGER (ADC_ADCR_TRGCOND_Msk) |
#define | ADC_ADF_INT (ADC_ADSR_ADF_Msk) |
#define | ADC_CMP0_INT (ADC_ADSR_CMPF0_Msk) |
#define | ADC_CMP1_INT (ADC_ADSR_CMPF1_Msk) |
#define | ADC_SAMPLE_CLOCK_0 (0UL) |
#define | ADC_SAMPLE_CLOCK_1 (1UL) |
#define | ADC_SAMPLE_CLOCK_2 (2UL) |
#define | ADC_SAMPLE_CLOCK_4 (3UL) |
#define | ADC_SAMPLE_CLOCK_8 (4UL) |
#define | ADC_SAMPLE_CLOCK_16 (5UL) |
#define | ADC_SAMPLE_CLOCK_32 (6UL) |
#define | ADC_SAMPLE_CLOCK_64 (7UL) |
#define | ADC_SAMPLE_CLOCK_128 (8UL) |
#define | ADC_SAMPLE_CLOCK_256 (9UL) |
#define | ADC_SAMPLE_CLOCK_512 (10UL) |
#define | ADC_SAMPLE_CLOCK_1024 (11UL) |
#define | ADC_CONFIG_CH7(adc, u32Source) |
Configure the analog input source of channel 7. More... | |
#define | ADC_GET_CONVERSION_DATA(adc, u32ChNum) |
Get the latest ADC conversion data. More... | |
#define | ADC_GET_INT_FLAG(adc, u32Mask) |
Return the user-specified interrupt flags. More... | |
#define | ADC_CLR_INT_FLAG(adc, u32Mask) |
This macro clear the selected interrupt status bits. More... | |
#define | ADC_IS_BUSY(adc) |
Get the busy state of ADC. More... | |
#define | ADC_IS_DATA_OVERRUN(adc, u32ChNum) |
Check if the ADC conversion data is over written or not. More... | |
#define | ADC_IS_DATA_VALID(adc, u32ChNum) |
Check if the ADC conversion data is valid or not. More... | |
#define | ADC_POWER_DOWN(adc) |
Power down ADC module. More... | |
#define | ADC_POWER_ON(adc) |
Power on ADC module. More... | |
#define | ADC_ENABLE_CMP0(adc, u32ChNum, u32Condition, u32Data, u32MatchCount) |
Configure the comparator 0 and enable it. More... | |
#define | ADC_DISABLE_CMP0(adc) |
Disable comparator 0. More... | |
#define | ADC_ENABLE_CMP1(adc, u32ChNum, u32Condition, u32Data, u32MatchCount) |
Configure the comparator 1 and enable it. More... | |
#define | ADC_DISABLE_CMP1(adc) |
Disable comparator 1. More... | |
#define | ADC_SET_INPUT_CHANNEL(adc, u32Mask) |
Set ADC input channel. Enabled channel will be converted while ADC starts. More... | |
#define | ADC_START_CONV(adc) |
Start the A/D conversion. More... | |
#define | ADC_STOP_CONV(adc) |
Stop the A/D conversion. More... | |
Functions | |
void | ADC_Open (ADC_T *adc, uint32_t u32InputMode, uint32_t u32OpMode, uint32_t u32ChMask) |
This API configures ADC module to be ready for convert the input from selected channel. More... | |
void | ADC_Close (ADC_T *adc) |
Disable ADC module. More... | |
void | ADC_EnableHWTrigger (ADC_T *adc, uint32_t u32Source, uint32_t u32Param) |
Configure the hardware trigger condition and enable hardware trigger. More... | |
void | ADC_DisableHWTrigger (ADC_T *adc) |
Disable hardware trigger ADC function. More... | |
void | ADC_SetExtraSampleTime (ADC_T *adc, uint32_t u32ChNum, uint32_t u32SampleTime) |
Set ADC sample time for designated channel. More... | |
void | ADC_EnableInt (ADC_T *adc, uint32_t u32Mask) |
Enable the interrupt(s) selected by u32Mask parameter. More... | |
void | ADC_DisableInt (ADC_T *adc, uint32_t u32Mask) |
Disable the interrupt(s) selected by u32Mask parameter. More... | |
Mini51 series ADC driver header file.
Definition in file adc.h.