newPtz/drivers/drv_adc.h

24 lines
716 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 2 // 规则组配置规则序列的通道2个通道
#define LB_TIMES 5
// float ptz_Voltage_collect_adc1_task();
// float ptz_Current_collect_adc1_task();
float ptz_adc1_collect_task();
void adc_gpio_config(void);
void adc_config(void);
void init_data_collect_module(void);
#endif