newPtz/drivers/drv_adc.h

23 lines
734 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __DRV_ADC_H_
#define __DRV_ADC_H_
/* 自定义宏,方便修改通道和引脚 */
#define ADCX ADC1
#define VOLTAGE_ADC_CHANNEL ADC_CHANNEL_12
#define CURRENT_ADC_CHANNEL ADC_CHANNEL_13
#define ADC_GPIO_PORT GPIOC
#define VOLTAGE_ADC_PIN GPIO_PIN_2
#define CURRENT_ADC_PIN GPIO_PIN_3
#define ADC_CHANNEL_NUM 1 // 规则组配置规则序列的通道2个通道
#define LB_V_TIMES 7
#define LB_I_TIMES 12
#define LB_T_TIMES 7
void adc_config(void);
float ptz_Voltage_collect_adc1_task();
float ptz_Current_collect_adc1_task();
float ptz_temperature_collect_tmp75_task();
#endif