Go to the source code of this file.
Data Structures | |
| struct | adc12_config_t |
| ADC12 common configuration struct. More... | |
| struct | adc12_channel_config_t |
| ADC12 channel configuration struct. More... | |
| struct | adc12_channel_threshold_t |
| ADC12 channel configuration struct. More... | |
| struct | adc12_dma_config_t |
| ADC12 DMA configuration struct. More... | |
| struct | adc12_seq_dma_data_t |
| ADC12 DMA configuration struct for the sequence mode. More... | |
| struct | adc12_pmt_dma_data_t |
| ADC12 DMA configuration struct for the preemption mode. More... | |
| struct | adc12_prd_config_t |
| ADC12 configuration struct for the period mode. More... | |
| struct | adc12_seq_queue_config_t |
| ADC12 queue configuration struct for the sequence mode. More... | |
| struct | adc12_seq_config_t |
| ADC12 configuration struct for the sequence mode. More... | |
| struct | adc12_pmt_config_t |
| ADC12 trigger configuration struct for the preemption mode. More... | |
Macros | |
| #define | ADC12_IS_SIGNAL_TYPE_INVALID(TYPE) (TYPE > (uint32_t)adc12_sample_signal_count) |
| Define ADC12 validity check for the signal type. More... | |
| #define | ADC12_IS_CHANNEL_INVALID(CH) (CH > ADC12_SOC_MAX_CH_NUM) |
| Define ADC12 validity check for the channel number. More... | |
| #define | ADC12_IS_CHANNEL_SAMPLE_CYCLE_INVALID(CYC) (CYC == 0) |
| Define ADC12 validity check for the channel sample cycle. More... | |
| #define | ADC12_IS_TRIG_CH_INVLAID(CH) (CH > ADC_SOC_MAX_TRIG_CH_NUM) |
| Define ADC12 validity check for the trigger number. More... | |
| #define | ADC12_IS_TRIG_LEN_INVLAID(TRIG_LEN) (TRIG_LEN > ADC_SOC_MAX_TRIG_CH_LEN) |
| Define ADC12 validity check for the trigger length. More... | |
| #define | ADC12_IS_SEQ_LEN_INVLAID(LEN) ((LEN == 0) || (LEN > ADC_SOC_SEQ_MAX_LEN)) |
| Define ADC12 validity check for the sequence length. More... | |
| #define | ADC12_IS_SEQ_DMA_BUFF_LEN_INVLAID(LEN) ((LEN == 0) || (LEN > ADC_SOC_SEQ_MAX_DMA_BUFF_LEN_IN_4BYTES)) |
| Define ADC12 validity check for the DMA buffer length in the sequence mode. More... | |
| #define | ADC12_IS_PMT_DMA_BUFF_LEN_INVLAID(LEN) ((LEN == 0) || (LEN > ADC_SOC_PMT_MAX_DMA_BUFF_LEN_IN_4BYTES)) |
| Define ADC12 validity check for the DMA buffer length in the preemption mode. More... | |
Functions | |
Initialization and Deinitialization | |
| void | adc12_get_default_config (adc12_config_t *config) |
| Get a default configuration for an ADC12 instance. More... | |
| void | adc12_get_channel_default_config (adc12_channel_config_t *config) |
| Get a default configuration for an ADC12 channel. More... | |
| hpm_stat_t | adc12_deinit (ADC12_Type *ptr) |
| De-initialize an ADC12 instance. More... | |
| hpm_stat_t | adc12_init (ADC12_Type *ptr, adc12_config_t *config) |
| Initialize an ADC12 instance. More... | |
| hpm_stat_t | adc12_init_channel (ADC12_Type *ptr, adc12_channel_config_t *config) |
| Initialize an ADC12 channel. More... | |
| hpm_stat_t | adc12_get_channel_threshold (ADC12_Type *ptr, uint8_t ch, adc12_channel_threshold_t *config) |
| Get thresholds of an ADC12 channel. More... | |
| hpm_stat_t | adc12_set_prd_config (ADC12_Type *ptr, adc12_prd_config_t *config) |
| Configure the the period mode for an ADC12 instance. More... | |
| hpm_stat_t | adc12_set_seq_config (ADC12_Type *ptr, adc12_seq_config_t *config) |
| Configure the the sequence mode for an ADC12 instance. More... | |
| hpm_stat_t | adc12_set_pmt_config (ADC12_Type *ptr, adc12_pmt_config_t *config) |
| Configure the preemption mode for an ADC12 instance. More... | |
DMA Control | |
| static void | adc12_set_seq_stop_pos (ADC12_Type *ptr, uint16_t stop_pos) |
| Configure the stop position offset in the specified memory of DMA write operation for the sequence mode. More... | |
| static void | adc12_init_pmt_dma (ADC12_Type *ptr, uint32_t addr) |
| Configure the start address of DMA write operation for the preemption mode. More... | |
| hpm_stat_t | adc12_init_seq_dma (ADC12_Type *ptr, adc12_dma_config_t *config) |
| Configure the start address of DMA write operation for the sequence mode. More... | |
Status | |
| static uint32_t | adc12_get_status_flags (ADC12_Type *ptr) |
| Get all ADC12 status flags. More... | |
| static void | adc12_disable_busywait (ADC12_Type *ptr) |
| Set value of the WAIT_DIS bit. The ADC does not block access to the associated peripheral bus until the ADC has completed its conversion. *. More... | |
| static void | adc12_enable_busywait (ADC12_Type *ptr) |
| Set value of the WAIT_DIS bit. ADC blocks access to the associated peripheral bus until the ADC completes the conversion. More... | |
| static void | adc12_set_nonblocking_read (ADC12_Type *ptr) |
| Set nonblocking read in oneshot mode. More... | |
| static void | adc12_set_blocking_read (ADC12_Type *ptr) |
| Set blocking read in oneshot mode. More... | |
| static bool | adc12_is_nonblocking_mode (ADC12_Type *ptr) |
| Judge whether the current setting is none-blocking mode or not. More... | |
| static bool | adc12_get_conv_valid_status (ADC12_Type *ptr, uint8_t ch) |
| Get the status of a conversion validity. More... | |
| static void | adc12_clear_status_flags (ADC12_Type *ptr, uint32_t mask) |
| Clear the status flags. More... | |
Interrupts | |
| static void | adc12_enable_interrupts (ADC12_Type *ptr, uint32_t mask) |
| Enable interrupts. More... | |
| static void | adc12_disable_interrupts (ADC12_Type *ptr, uint32_t mask) |
| Disable interrupts. More... | |
Trigger and Conversion | |
| hpm_stat_t | adc12_trigger_seq_by_sw (ADC12_Type *ptr) |
| Trigger ADC conversions by software in sequence mode. More... | |
| hpm_stat_t | adc12_trigger_pmt_by_sw (ADC12_Type *ptr, uint8_t trig_ch) |
| Trigger ADC conversions by software in preemption mode. More... | |
| hpm_stat_t | adc12_get_oneshot_result (ADC12_Type *ptr, uint8_t ch, uint16_t *result) |
| Get the result in oneshot mode. More... | |
| hpm_stat_t | adc12_get_prd_result (ADC12_Type *ptr, uint8_t ch, uint16_t *result) |
| Get the result in the period mode. More... | |