Job_SignsPads/STM32/Code/STM32F405/Application/adc.h
2025-04-22 10:29:37 +08:00

36 lines
898 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.

/*
* @Description:
* @Version: 1.0
* @Autor: lzc
* @Date: 2022-11-02 08:47:08
* @LastEditors: lzc
* @LastEditTime: 2023-05-29 10:04:59
*/
#ifndef __ADC_H
#define __ADC_H
#include "main.h"
#define AIN_1310 (AD_Value[0]) //OLT_1490
#define ADC1_2 (AD_Value[1]) //OLT_1550
#define ADC1_1 (AD_Value[2]) //OLT_SEVEN
#define ADC0_1 (AD_Value[3]) //ONU_1310突发光
#define ADC0_0 (AD_Value[4]) //ONU_1310长发光
#define ADC0_3 (AD_Value[5]) //ONU_1490
#define ADC0_2 (AD_Value[6]) //ONU_1550
#define ADC_BAT (AD_Value[7]) //电池
#define USB_CHK PAin(15) //PA15
#define STM32_ADC_REF 3.30 //stm32 adc ref
#define ADC_DMA_CHNNEL_SUM 9 //ADC总通道数
extern volatile u16 AD_Value[ADC_DMA_CHNNEL_SUM]; //用来存放ADC转换结果也是DMA的目标地址
void ADC_configuration(void);
extern float Adjust_ADC(u32 adc_val);
#endif