sht30_collect.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-05-28 Administrator the first version
  9. */
  10. #ifndef APPLICATIONS_INC_SHT30_COLLECT_H_
  11. #define APPLICATIONS_INC_SHT30_COLLECT_H_
  12. #define ADC_VOL_BASE 1.20 //ADC内部电压基准,后续版本可改为针对每一块板子实际测量后写入 flash
  13. #define N 5 //adc采样计算次数
  14. #define UART_485 "uart5" /*串口设备名称*/
  15. extern rt_uint32_t voltage,current;
  16. extern int8_t hum_value,tem_value;
  17. int UART_485_INIT(void);
  18. int Read_Real_Current(void);
  19. int Read_Real_Voltage(void);
  20. int Read_Fuse_Voltage(void);
  21. int Read_Rain_Voltage(void);
  22. int Read_Light_Voltage(void);
  23. int sht30_collect(void);
  24. int Read_Ntc_Voltage(void);
  25. int TempCalculate(float Rv,int B,int BasicRx);
  26. short Get_Temprate(void);
  27. unsigned int filter_Mid(int adc_return);
  28. unsigned int filter_voltage(void);
  29. #endif /* APPLICATIONS_INC_SHT30_COLLECT_H_ */