HPM SDK
HPMicro Software Development Kit
hpm_adc16_drv.c File Reference
#include "hpm_adc16_drv.h"
#include "hpm_soc_feature.h"

Functions

void adc16_get_default_config (adc16_config_t *config)
 Get a default configuration for an ADC16 instance. More...
 
void adc16_get_channel_default_config (adc16_channel_config_t *config)
 Get a default configuration for an ADC16 Channel. More...
 
static hpm_stat_t adc16_do_calibration (ADC16_Type *ptr)
 
hpm_stat_t adc16_deinit (ADC16_Type *ptr)
 De-initialize an ADC16 instance. More...
 
hpm_stat_t adc16_init (ADC16_Type *ptr, adc16_config_t *config)
 Initialize an ADC16 instance. More...
 
hpm_stat_t adc16_init_channel (ADC16_Type *ptr, adc16_channel_config_t *config)
 Initialize an ADC16 channel. More...
 
hpm_stat_t adc16_get_channel_threshold (ADC16_Type *ptr, uint8_t ch, adc16_channel_threshold_t *config)
 Get thresholds of an ADC16 channel. More...
 
hpm_stat_t adc16_init_seq_dma (ADC16_Type *ptr, adc16_dma_config_t *dma_config)
 Configure the start address of DMA write operation for the sequence mode. More...
 
hpm_stat_t adc16_set_prd_config (ADC16_Type *ptr, adc16_prd_config_t *config)
 Configure the the period mode for an ADC16 instance. More...
 
hpm_stat_t adc16_trigger_seq_by_sw (ADC16_Type *ptr)
 Trigger ADC conversions by software in sequence mode. More...
 
hpm_stat_t adc16_set_seq_config (ADC16_Type *ptr, adc16_seq_config_t *config)
 Configure the sequence mode for an ADC16 instance. More...
 
hpm_stat_t adc16_trigger_pmt_by_sw (ADC16_Type *ptr, uint8_t trig_ch)
 Trigger ADC conversions by software in preemption mode. More...
 
hpm_stat_t adc16_set_pmt_config (ADC16_Type *ptr, adc16_pmt_config_t *config)
 Configure the preemption mode for an ADC16 instance. More...
 
hpm_stat_t adc16_set_pmt_queue_enable (ADC16_Type *ptr, uint8_t trig_ch, bool enable)
 Set the queue enable control. More...
 
hpm_stat_t adc16_enable_pmt_queue (ADC16_Type *ptr, uint8_t trig_ch)
 Enable the specified preemption queue. More...
 
hpm_stat_t adc16_disable_pmt_queue (ADC16_Type *ptr, uint8_t trig_ch)
 Disable the specified preemption queue. More...
 
hpm_stat_t adc16_get_oneshot_result (ADC16_Type *ptr, uint8_t ch, uint16_t *result)
 Get the result in oneshot mode. More...
 
hpm_stat_t adc16_get_prd_result (ADC16_Type *ptr, uint8_t ch, uint16_t *result)
 Get the result in the period mode. More...
 

Function Documentation

◆ adc16_do_calibration()

static hpm_stat_t adc16_do_calibration ( ADC16_Type ptr)
static