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

Functions

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...
 
static hpm_stat_t adc12_do_calibration (ADC12_Type *ptr, adc12_sample_signal_t diff_sel)
 
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_init_seq_dma (ADC12_Type *ptr, adc12_dma_config_t *dma_config)
 Configure the start address of DMA write operation for the sequence mode. 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_trigger_seq_by_sw (ADC12_Type *ptr)
 Trigger ADC conversions by software in sequence mode. 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_trigger_pmt_by_sw (ADC12_Type *ptr, uint8_t trig_ch)
 Trigger ADC conversions by software in preemption mode. 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...
 
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...
 

Function Documentation

◆ adc12_do_calibration()

static hpm_stat_t adc12_do_calibration ( ADC12_Type ptr,
adc12_sample_signal_t  diff_sel 
)
static