|
enum | ADC_RefVolTypeDef { ADC_VREF_0P6V,
ADC_VREF_0P9V,
ADC_VREF_1P2V,
ADC_VREF_VBAT_N
} |
|
enum | ADC_VbatDivTypeDef { ADC_VBAT_DIVIDER_OFF = 0,
ADC_VBAT_DIVIDER_1F4,
ADC_VBAT_DIVIDER_1F3,
ADC_VBAT_DIVIDER_1F2
} |
|
enum | ADC_InputNchTypeDef {
NOINPUTN,
B0N,
B1N,
B2N,
B3N,
B4N,
B5N,
B6N,
B7N,
C4N,
C5N,
PGA0N,
PGA1N,
TEMSENSORN,
RSVD_N,
GND
} |
|
enum | ADC_InputPchTypeDef {
NOINPUTP,
B0P,
B1P,
B2P,
B3P,
B4P,
B5P,
B6P,
B7P,
C4P,
C5P,
PGA0P,
PGA1P,
TEMSENSORP,
RSVD_P,
VBAT
} |
|
enum | ADC_ResTypeDef { RES8,
RES10,
RES12,
RES14
} |
|
enum | ADC_InputModeTypeDef { SINGLE_ENDED_MODE = 0,
DIFFERENTIAL_MODE = 1
} |
|
enum | ADC_SampCycTypeDef {
SAMPLING_CYCLES_3,
SAMPLING_CYCLES_6,
SAMPLING_CYCLES_9,
SAMPLING_CYCLES_12,
SAMPLING_CYCLES_15,
SAMPLING_CYCLES_18,
SAMPLING_CYCLES_21,
SAMPLING_CYCLES_24,
SAMPLING_CYCLES_27,
SAMPLING_CYCLES_30,
SAMPLING_CYCLES_33,
SAMPLING_CYCLES_36,
SAMPLING_CYCLES_39,
SAMPLING_CYCLES_42,
SAMPLING_CYCLES_45,
SAMPLING_CYCLES_48
} |
|
enum | ADC_ChTypeDef { ADC_LEFT_CHN = BIT(0),
ADC_RIGHT_CHN = BIT(1),
ADC_MISC_CHN = BIT(2),
ADC_RNS_CHN = BIT(3)
} |
|
enum | ADC_PreScalingTypeDef { ADC_PRESCALER_1,
ADC_PRESCALER_1F2,
ADC_PRESCALER_1F4,
ADC_PRESCALER_1F8
} |
|
enum | ADC_Cur_TrimTypeDef { ADC_CUR_TRIM_PER75,
ADC_CUR_TRIM_PER100,
ADC_CUR_TRIM_PER125,
ADC_CUR_TRIM_PER150
} |
|
enum | ADC_Gain_BiasTypeDef { GAIN_STAGE_BIAS_PER75 = 0,
GAIN_STAGE_BIAS_PER100,
GAIN_STAGE_BIAS_PER125,
GAIN_STAGE_BIAS_PER150
} |
|
enum | ADC_ModeTypeDef { ADC_NORMAL_MODE = 0,
ADC_RNS_MODE = BIT(4)
} |
|
enum | RNG_SrcTypeDef {
SAR_ADC_RNG_MODE = 0,
R_RNG_MODE_0 = 2,
R_RNG_MODE_1 = 3,
ADC_DAT12_RNG_MODE = 4,
ADC_DAT5_RNG_MODE = 6
} |
|
enum | RNG_UpdataTypeDef { READ_UPDATA = BIT(3),
CLOCLK_UPDATA = BIT(4)
} |
|
enum | { FLD_ADC_SAMPLE_CLK_DIV = BIT_RNG(0,2)
} |
|
enum | { FLD_ADC_VREF_CHN_L = BIT_RNG(0,1),
FLD_ADC_VREF_CHN_R = BIT_RNG(2,3),
FLD_ADC_VREF_CHN_M = BIT_RNG(4,5)
} |
|
enum | { FLD_ADC_VREF_VBAT_DIV = BIT_RNG(2,3)
} |
|
enum | { FLD_ADC_AIN_NEGATIVE = BIT_RNG(0,3),
FLD_ADC_AIN_POSITIVE = BIT_RNG(4,7)
} |
|
enum | { FLD_ADC_RES_L = BIT_RNG(0,1),
FLD_ADC_RES_R = BIT_RNG(4,5)
} |
|
enum | { FLD_ADC_RES_M = BIT_RNG(0,1),
FLD_ADC_EN_DIFF_CHN_L = BIT(4),
FLD_ADC_EN_DIFF_CHN_R = BIT(5),
FLD_ADC_EN_DIFF_CHN_M = BIT(6)
} |
|
enum | { FLD_ADC_TSAMPLE_CYCLE_CHN_M = BIT_RNG(0,3)
} |
|
enum | { FLD_ADC_TSAMPLE_CYCLE_CHN_L = BIT_RNG(0,3),
FLD_ADC_TSAMPLE_CYCLE_CHN_R = BIT_RNG(4,7)
} |
|
enum | { FLD_R_MAX_MC0 = BIT_RNG(0,7)
} |
|
enum | { FLD_R_MAX_C0 = BIT_RNG(0,7)
} |
|
enum | { FLD_R_MAX_S = BIT_RNG(0,3),
FLD_R_MAX_C1 = BIT_RNG(4,5),
FLD_R_MAX_MC1 = BIT_RNG(6,7)
} |
|
enum | {
FLD_ADC_CHN_EN_L = BIT(0),
FLD_ADC_CHN_EN_R = BIT(1),
FLD_ADC_CHN_EN_M = BIT(2),
FLD_ADC_CHN_EN_RNS = BIT(3),
FLD_ADC_MAX_SCNT = BIT_RNG(4,6)
} |
|
enum | { FLD_ADC_ITRIM_PREAMP = BIT_RNG(0,1),
FLD_ADC_ITRIM_VREFBUF = BIT_RNG(2,3),
FLD_ADC_ITRIM_VCMBUF = BIT_RNG(4,5),
FLD_SEL_AIN_SCALE = BIT_RNG(6,7)
} |
|
enum | { FLD_PGA_CAP_TRIM_EN_L = BIT(0),
FLD_PGA_CAP_TRIM_EN_R = BIT(1),
FLD_PGA_ITRIM_BOOST_L = BIT_RNG(4,5),
FLD_PGA_ITRIM_BOOST_R = BIT_RNG(6,7)
} |
|
enum | {
FLD_PGA_ITRIM_GAIN_L = BIT_RNG(0,1),
FLD_PGA_ITRIM_GAIN_R = BIT_RNG(2,3),
FLD_ADC_MODE = BIT(4),
FLD_SAR_ADC_POWER_DOWN = BIT(5),
FLD_POWER_DOWN_PGA_CHN_L = BIT(6),
FLD_POWER_DOWN_PGA_CHN_R = BIT(7)
} |
|
enum | { FLD_ADC_MISC_DATA = BIT_RNG(0,6),
FLD_ADC_MISC_VLD = BIT(7)
} |
|
|
static void | adc_calib_vref_enable (unsigned char en) |
| This function enable adc reference voltage calibration. More...
|
|
static void | adc_reset_adc_module (void) |
| This function reset adc module. More...
|
|
static void | adc_enable_clk_24m_to_sar_adc (unsigned int en) |
| This function enable adc source clock: external 24M. More...
|
|
static void | adc_set_sample_clk (unsigned char div) |
| This function sets adc sample clk. adc sample clk = 24M/(1+div) div: 0~7. More...
|
|
static void | adc_set_vref (ADC_RefVolTypeDef vRef_L, ADC_RefVolTypeDef vRef_R, ADC_RefVolTypeDef vRef_M) |
| This function sets ADC reference voltage for L,R and Mic channel. More...
|
|
static void | adc_set_vref_chn_left (ADC_RefVolTypeDef v_ref) |
| This function sets ADC reference voltage for the L channel. More...
|
|
static void | adc_set_vref_chn_right (ADC_RefVolTypeDef v_ref) |
| This function sets ADC reference voltage for the R channel. More...
|
|
static void | adc_set_vref_chn_misc (ADC_RefVolTypeDef v_ref) |
| This function sets ADC reference voltage for the MISC channel. More...
|
|
void | adc_set_ref_voltage (ADC_ChTypeDef ch_n, ADC_RefVolTypeDef v_ref) |
| This function serves to set the channel reference voltage. More...
|
|
static void | adc_set_vref_vbat_divider (ADC_VbatDivTypeDef vbat_div) |
| This function select Vbat voltage divider. More...
|
|
static void | adc_set_ain_chn_misc (ADC_InputPchTypeDef p_ain, ADC_InputNchTypeDef n_ain) |
| This function serves to set input channel for the MISC channel. More...
|
|
static void | adc_set_ain_chn_left (ADC_InputPchTypeDef p_ain, ADC_InputNchTypeDef n_ain) |
| This function serves to set input channel for the left channel. More...
|
|
static void | adc_set_ain_chn_right (ADC_InputPchTypeDef p_ain, ADC_InputNchTypeDef n_ain) |
| This function serves to set input channel for the right channel. More...
|
|
static void | adc_set_ain_negative_chn_misc (ADC_InputNchTypeDef v_ain) |
| This function sets ADC analog negative input channel for the MISC channel. More...
|
|
static void | adc_set_ain_positive_chn_misc (ADC_InputPchTypeDef v_ain) |
| This function sets ADC analog positive input channel for the MISC channel. More...
|
|
static void | adc_set_ain_negative_chn_left (ADC_InputNchTypeDef v_ain) |
| This function sets ADC analog negative input channel for the L channel. More...
|
|
static void | adc_set_ain_positive_chn_left (ADC_InputPchTypeDef v_ain) |
| This function sets ADC analog positive input channel for the L channel. More...
|
|
static void | adc_set_ain_negative_chn_right (ADC_InputNchTypeDef v_ain) |
| This function sets ADC analog negative input channel for the R channel. More...
|
|
static void | adc_set_ain_positive_chn_right (ADC_InputPchTypeDef v_ain) |
| This function sets ADC analog positive input channel for the R channel. More...
|
|
static void | adc_set_resolution_chn_left (ADC_ResTypeDef v_res) |
| This function sets ADC resolution for the L channel. More...
|
|
static void | adc_set_resolution_chn_right (ADC_ResTypeDef v_res) |
| This function sets ADC resolution for the R channel. More...
|
|
void | adc_set_resolution (ADC_ChTypeDef ch_n, ADC_ResTypeDef v_res) |
| This function serves to set resolution. More...
|
|
static void | adc_set_resolution_chn_misc (ADC_ResTypeDef v_res) |
| This function sets ADC resolution for the MISC channel. More...
|
|
static void | adc_set_input_mode_chn_left (ADC_InputModeTypeDef m_input) |
| This function sets ADC input mode for the L channel. More...
|
|
static void | adc_set_input_mode_chn_right (ADC_InputModeTypeDef m_input) |
| This function sets ADC input mode for the R channel. More...
|
|
static void | adc_set_input_mode_chn_misc (ADC_InputModeTypeDef m_input) |
| This function sets ADC input mode for the MISC channel. More...
|
|
void | adc_set_input_mode (ADC_ChTypeDef ch_n, ADC_InputModeTypeDef m_input) |
| This function serves to set input_mode. More...
|
|
static void | adc_set_tsample_cycle_chn_misc (ADC_SampCycTypeDef adcST) |
| This function sets ADC sample time(the number of adc clocks for sample cycles) for the MISC channel. More...
|
|
static void | adc_set_tsample_cycle_chn_left (ADC_SampCycTypeDef adcST) |
| This function sets ADC sample time(the number of adc clocks for sample cycles) for the L channel. More...
|
|
static void | adc_set_tsample_cycle_chn_right (ADC_SampCycTypeDef adcST) |
| This function sets ADC sample time(the number of adc clocks for sample cycles) for the R channel. More...
|
|
void | adc_set_tsample_cycle (ADC_ChTypeDef ch_n, ADC_SampCycTypeDef adcST) |
| This function serves to set sample_cycle. More...
|
|
static void | adc_set_length_set_state (unsigned char r_max_s) |
| This function sets length of each ¡°set¡± state. More...
|
|
static void | adc_set_length_capture_state_for_chn_misc_rns (unsigned short r_max_mc) |
| This function sets length of each "capture" state for MISC channel. More...
|
|
static void | adc_set_length_capture_state_for_chn_left_right (unsigned short r_max_c) |
| This function sets length of each "capture" state for R and L channel. More...
|
|
static void | adc_set_state_length (unsigned short R_max_mc, unsigned short R_max_c, unsigned char R_max_s) |
| This function serves to set state and capture_state length. More...
|
|
static void | adc_set_chn_enable (ADC_ChTypeDef ad_ch) |
| This function sets ADC input channel. More...
|
|
static void | adc_set_chn_enable_and_max_state_cnt (ADC_ChTypeDef ad_ch, unsigned char s_cnt) |
| This function sets total state index for the channel. More...
|
|
static void | adc_set_max_state_cnt (unsigned char s_cnt) |
| This function sets total state index for sampling state. More...
|
|
static void | adc_set_itrim_preamp (ADC_Cur_TrimTypeDef bias) |
| This function sets pre-scaling for comparator preamp bias current trimming. More...
|
|
static void | adc_set_itrim_vrefbuf (ADC_Cur_TrimTypeDef bias) |
| This function sets pre-scaling for Vref buffer bias current trimming. More...
|
|
static void | adc_set_itrim_vcmbuf (ADC_Cur_TrimTypeDef bias) |
| This function sets pre-scaling for Vref(Vcmbuf) buffer bias current trimming. More...
|
|
static void | adc_set_left_boost_bias (ADC_Gain_BiasTypeDef bias) |
| This function sets left boost bias with PGA enable. More...
|
|
static void | adc_set_right_boost_bias (ADC_Gain_BiasTypeDef bias) |
| This function sets right boost bias with PGA enable. More...
|
|
static void | adc_set_left_right_gain_bias (ADC_Gain_BiasTypeDef bias_L, ADC_Gain_BiasTypeDef bias_R) |
| This function gets left gain bias with PGA enable. More...
|
|
static void | adc_set_left_gain_bias (ADC_Gain_BiasTypeDef bias) |
| This function gets left gain bias with PGA enable. More...
|
|
static void | adc_set_right_gain_bias (ADC_Gain_BiasTypeDef bias) |
| This function gets right_gain_bias with PGA enable. More...
|
|
static void | adc_set_mode (ADC_ModeTypeDef adc_m) |
| This function serves to set mode for ADC. More...
|
|
static void | adc_power_on_sar_adc (unsigned char on_off) |
| This function sets sar_adc power. More...
|
|
static void | pga_left_chn_power_on (unsigned char on_off) |
| This function sets PGA-Left-channel power. More...
|
|
static void | pga_right_chn_power_on (unsigned char on_off) |
| This function sets PGA Right channel power. More...
|
|
static void | RNG_Set (RNG_SrcTypeDef src, RNG_UpdataTypeDef update_type) |
| This function sets ADC RNS channel source and random updata type. More...
|
|
static unsigned short | RNG_Read (void) |
| This function serves to read random number. More...
|
|
void | adc_set_ain_channel_single_ended_input_mode (ADC_ChTypeDef ch_n, ADC_InputPchTypeDef InPCH) |
| This function serves to set input channel in single_ended_input_mode. More...
|
|
void | adc_set_ain_channel_differential_mode (ADC_ChTypeDef ch_n, ADC_InputPchTypeDef InPCH, ADC_InputNchTypeDef InNCH) |
| This function serves to set input channel in differential_mode. More...
|
|
void | adc_set_ain_pre_scaler (ADC_PreScalingTypeDef v_scl) |
| This function serves to set pre_scaling. More...
|
|
void | adc_init (void) |
| This function serves to ADC init. More...
|
|
void | adc_base_pin_init (GPIO_PinTypeDef pin) |
| This function is used for IO port configuration of ADC IO port voltage sampling. More...
|
|
void | adc_vbat_pin_init (GPIO_PinTypeDef pin) |
| This function is used for IO port configuration of ADC supply voltage sampling. More...
|
|
void | adc_base_init (GPIO_PinTypeDef pin) |
| This function is used for ADC configuration of ADC IO voltage sampling. More...
|
|
void | adc_vbat_init (GPIO_PinTypeDef pin) |
| This function is used for ADC configuration of ADC supply voltage sampling. More...
|
|
unsigned int | adc_sample_and_get_result (void) |
| This function serves to set adc sampling and get results. More...
|
|