![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
CI130X芯片ADC模块的驱动程序 更多...
#include "ci130x_adc.h"
结构体 | |
struct | ADC_TypeDef |
函数 | |
void | adc_clear_flag (void) |
ADC清除中断全局变量标志 更多... | |
void | adc_wait_int (adc_channelx_t cha) |
ADC等待中断全局变量标志 更多... | |
void | ADC_irqhandle (void) |
ADC中断服务函数 更多... | |
void | adc_power_ctrl (FunctionalState cmd) |
ADC电路电源使能 更多... | |
void | adc_continuons_convert (FunctionalState cmd) |
ADC连续转换使能 更多... | |
void | adc_calibrate (FunctionalState cmd) |
ADC校准使能 更多... | |
void | adc_period_monitor (adc_channelx_t channel, FunctionalState cmd) |
ADC通道周期监测使能(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_period_enable (FunctionalState cmd) |
ADC周期监测使能(只能工作于单次采样模式下) 更多... | |
void | adc_int_sel (adc_int_mode_t condi) |
ADC中断产生条件选择 更多... | |
void | adc_channel_min_value_int (adc_channelx_t channel, FunctionalState cmd) |
ADC通道采样结果低于阀值下限中断使能(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_channel_max_value_int (adc_channelx_t channel, FunctionalState cmd) |
ADC通道采样结果超过阀值上限中断使能(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_mask_int (FunctionalState cmd) |
ADC中断屏蔽设置 更多... | |
uint32_t | adc_int_flag (adc_channelx_t channel) |
读取某个通道的ADC中断标志(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_int_clear (adc_channelx_t channel) |
ADC中断标志清除(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_soc_soft_ctrl (FunctionalState cmd) |
ADC软件触发(软件强制开始转换) 更多... | |
void | adc_convert_config (adc_channelx_t channel, adc_clkcyclex_t holdtime) |
:ADC 转换通道和采样保持时间配置(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
uint32_t | adc_get_result (adc_channelx_t channel) |
获取ADC某个通道的转换结果(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_chax_period (adc_channelx_t channel, uint16_t period) |
ADC通道采样周期配置(配置之后采样周期为(period + 1)*512) (只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_channel_min_value (adc_channelx_t channel, uint16_t val) |
ADC 通道下限阀值配置(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) (只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_channel_max_value (adc_channelx_t channel, uint16_t val) |
ADC 通道上限阀值配置(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) (只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
int8_t | adc_get_vol_value (adc_channelx_t cha, float *vol_val) |
获取ADC转换的电压值 更多... | |
void | adc_poweron (void) |
ADC上电 更多... | |
void | adc_powerdown (void) |
ADC下电 更多... | |
void | adc_reset (void) |
ADC复位 更多... | |
void | adc_signal_mode (adc_channelx_t cha) |
ADC soft软件触发模式配置 更多... | |
void | adc_series_mode (adc_channelx_t cha) |
ADC连续模式配置 更多... | |
void | adc_cycle_mode (adc_channelx_t cha, uint16_t cycle) |
ADC周期模式配置 更多... | |
void | adc_caculate_mode (void) |
ADC校准模式配置 更多... | |
void | soft_trige_start (int channel_num) |
void | continu_init (void) |
void | continu_start (void) |
void | period_init (void) |
void | period_other_init (void) |
变量 | |
volatile uint8_t | adc_cha0_int_flag = 0 |
volatile uint8_t | adc_cha1_int_flag = 0 |
volatile uint8_t | adc_cha2_int_flag = 0 |
volatile uint8_t | adc_cha3_int_flag = 0 |
volatile uint8_t | adc_cha4_int_flag = 0 |
volatile uint8_t | adc_cha5_int_flag = 0 |
CI130X芯片ADC模块的驱动程序
struct ADC_TypeDef |
void adc_channel_max_value | ( | adc_channelx_t | channel, |
uint16_t | val | ||
) |
ADC 通道上限阀值配置(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) (只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
val | 上限值 |
void adc_channel_max_value_int | ( | adc_channelx_t | channel, |
FunctionalState | cmd | ||
) |
ADC通道采样结果超过阀值上限中断使能(只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
cmd | 使能或关闭 |
void adc_channel_min_value | ( | adc_channelx_t | channel, |
uint16_t | val | ||
) |
ADC 通道下限阀值配置(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) (只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
val | 下限值 |
void adc_channel_min_value_int | ( | adc_channelx_t | channel, |
FunctionalState | cmd | ||
) |
ADC通道采样结果低于阀值下限中断使能(只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
cmd | 使能或关闭 |
void adc_chax_period | ( | adc_channelx_t | channel, |
uint16_t | period | ||
) |
ADC通道采样周期配置(配置之后采样周期为(period + 1)*512) (只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
period | 周期配置 |
void adc_clear_flag | ( | void | ) |
ADC清除中断全局变量标志
void adc_continuons_convert | ( | FunctionalState | cmd | ) |
ADC连续转换使能
cmd | 打开或关闭 |
void adc_convert_config | ( | adc_channelx_t | channel, |
adc_clkcyclex_t | holdtime | ||
) |
:ADC 转换通道和采样保持时间配置(只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
holdtime | 采样保持时间选择 |
uint32_t adc_int_flag | ( | adc_channelx_t | channel | ) |
读取某个通道的ADC中断标志(只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | 通道选择 |
void adc_int_sel | ( | adc_int_mode_t | condi | ) |
ADC中断产生条件选择
condi | ADC_Int_Condition_Sample_Abnormal:采样值异常时产生中断 ADC_INT_CONDITION_SAMPLE_END:每次采样结束都产生中断 |
void adc_mask_int | ( | FunctionalState | cmd | ) |
ADC中断屏蔽设置
cmd | ENABLE:屏蔽ADC中断(不会产生ADC中断) DISABLE:不屏蔽ADC中断(会产生ADC中断) |
void adc_period_enable | ( | FunctionalState | cmd | ) |
ADC周期监测使能(只能工作于单次采样模式下)
cmd | 打开或关闭 |
void adc_period_monitor | ( | adc_channelx_t | channel, |
FunctionalState | cmd | ||
) |
ADC通道周期监测使能(只支持ADC_CHANNEL_0-ADC_CHANNEL_5)
channel | adc通道选择 |
cmd | 使能或关闭 |
void adc_power_ctrl | ( | FunctionalState | cmd | ) |
ADC电路电源使能
cmd | 打开或者关闭 |
void adc_powerdown | ( | void | ) |
ADC下电
void continu_init | ( | void | ) |
void continu_start | ( | void | ) |
void period_init | ( | void | ) |
void period_other_init | ( | void | ) |
void soft_trige_start | ( | int | channel_num | ) |
volatile uint8_t adc_cha0_int_flag = 0 |
volatile uint8_t adc_cha1_int_flag = 0 |
volatile uint8_t adc_cha2_int_flag = 0 |
volatile uint8_t adc_cha3_int_flag = 0 |
volatile uint8_t adc_cha4_int_flag = 0 |
volatile uint8_t adc_cha5_int_flag = 0 |