| 12345678910111213141516171819202122232425262728293031323334 |
- /*
- * Copyright (c) 2006-2020, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2020-05-28 Administrator the first version
- */
- #ifndef APPLICATIONS_INC_SHT30_COLLECT_H_
- #define APPLICATIONS_INC_SHT30_COLLECT_H_
- #define ADC_VOL_BASE 1.20 //ADC内部电压基准,后续版本可改为针对每一块板子实际测量后写入 flash
- #define N 11 //adc采样计算次数
- #define UART_485 "uart5" /*串口设备名称*/
- extern rt_uint32_t voltage,current;
- extern int8_t hum_value,tem_value;
- int UART_485_INIT(void);
- int Read_Real_Current(void);
- int Read_Real_Voltage(void);
- int Read_Fuse_Voltage(void);
- int Read_Rain_Voltage(void);
- int Read_Light_Voltage(void);
- int sht30_collect(void);
- int Read_Ntc_Voltage(void);
- int TempCalculate(float Rv,int B,int BasicRx);
- short Get_Temprate(void);
- unsigned int filter_Mid(int adc_return);
- unsigned int filter_voltage(void);
- #endif /* APPLICATIONS_INC_SHT30_COLLECT_H_ */
- //STM32之ADC(内部基准电压,参考电压)
- //https://www.cnblogs.com/jieruishu/p/9023811.html
|