![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
CI130X芯片ADC模块的驱动程序头文件 更多...
#include "ci130x_system.h"
宏定义 | |
#define | ADC_DRIVER_USE_RTOS 0 |
#define | ADC_INIT_ADDR 0x1ff53000 |
#define | AIN0 *(volatile unsigned int *)(ADC_INIT_ADDR + 0*4) |
#define | AIN1 *(volatile unsigned int *)(ADC_INIT_ADDR + 1*4) |
#define | AIN2 *(volatile unsigned int *)(ADC_INIT_ADDR + 2*4) |
#define | AIN3 *(volatile unsigned int *)(ADC_INIT_ADDR + 3*4) |
#define | ADC_INIT_RSEILT_ADDR 0x1ff54000 |
#define | RESULT_AIN0 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +0*4) |
#define | RESULT_AIN1 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +1*4) |
#define | RESULT_AIN2 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +2*4) |
#define | RESULT_AIN3 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +3*4) |
#define | RESULT_JY_AIN0 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +4*4) |
#define | RESULT_JY_AIN1 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +5*4) |
#define | RESULT_JY_AIN2 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +6*4) |
#define | RESULT_JY_AIN3 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +7*4) |
#define | a3_result_in (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +8*4) |
#define | an0_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ 13*4) |
#define | an1_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24)*4) |
#define | an2_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12)*4) |
#define | an3_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8)*4) |
#define | an0_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6)*4) |
#define | an1_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6+3)*4) |
#define | an2_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6+3+3)*4) |
#define | an3_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6+3+3+3)*4) |
枚举 | |
enum | adc_clkcyclex_t { ADC_CLKCYCLE_1 = 0, ADC_CLKCYCLE_2 =1, ADC_CLKCYCLE_3 =2, ADC_CLKCYCLE_4 =3, ADC_CLKCYCLE_5 =4 } |
采样保持时间选择 更多... | |
enum | adc_channelx_t { ADC_CHANNEL_0 =0, ADC_CHANNEL_1 =1, ADC_CHANNEL_2 =2, ADC_CHANNEL_3 =3, ADC_CHANNEL_4 =4, ADC_CHANNEL_5 =5, ADC_CHANNEL_MAX =6 } |
ADC通道编号 更多... | |
enum | adc_int_mode_t { ADC_INT_MODE_TRANS_END = 0, ADC_INT_MODE_VALUE_NOT_MEET = 1 } |
ADC中断条件选择 更多... | |
函数 | |
void | adc_int_clear (adc_channelx_t channel) |
ADC中断标志清除(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_soc_soft_ctrl (FunctionalState cmd) |
ADC软件触发(软件强制开始转换) 更多... | |
int8_t | adc_get_vol_value (adc_channelx_t cha, float *vol_val) |
获取ADC转换的电压值 更多... | |
void | adc_poweron (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校准模式配置 更多... | |
uint32_t | adc_get_result (adc_channelx_t channel) |
获取ADC某个通道的转换结果(只支持ADC_CHANNEL_0-ADC_CHANNEL_5) 更多... | |
void | adc_calibrate (FunctionalState cmd) |
ADC校准使能 更多... | |
void | adc_wait_int (adc_channelx_t cha) |
ADC等待中断全局变量标志 更多... | |
void | ADC_irqhandle (void) |
ADC中断服务函数 更多... | |
CI130X芯片ADC模块的驱动程序头文件
#define a3_result_in (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +8*4) |
#define ADC_DRIVER_USE_RTOS 0 |
#define ADC_INIT_ADDR 0x1ff53000 |
#define ADC_INIT_RSEILT_ADDR 0x1ff54000 |
#define AIN0 *(volatile unsigned int *)(ADC_INIT_ADDR + 0*4) |
#define AIN1 *(volatile unsigned int *)(ADC_INIT_ADDR + 1*4) |
#define AIN2 *(volatile unsigned int *)(ADC_INIT_ADDR + 2*4) |
#define AIN3 *(volatile unsigned int *)(ADC_INIT_ADDR + 3*4) |
#define an0_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6)*4) |
#define an0_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ 13*4) |
#define an1_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6+3)*4) |
#define an1_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24)*4) |
#define an2_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6+3+3)*4) |
#define an2_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12)*4) |
#define an3_result_last (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8+6+3+3+3)*4) |
#define an3_result_other (volatile unsigned int *)(ADC_INIT_RSEILT_ADDR+ (13+24+12+8)*4) |
#define RESULT_AIN0 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +0*4) |
#define RESULT_AIN1 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +1*4) |
#define RESULT_AIN2 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +2*4) |
#define RESULT_AIN3 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +3*4) |
#define RESULT_JY_AIN0 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +4*4) |
#define RESULT_JY_AIN1 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +5*4) |
#define RESULT_JY_AIN2 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +6*4) |
#define RESULT_JY_AIN3 *(volatile unsigned int *)(ADC_INIT_RSEILT_ADDR +7*4) |