sensor.h 430 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #ifndef _SENSOR_H_
  3. #define _SENSOR_H_
  4. /* Status code */
  5. typedef enum {
  6. AHT_St_OK = 0,
  7. AHT_St_Err,
  8. AHT_St_Bsy,
  9. AHT_St_CRC
  10. } aht20_st_t;
  11. /* Data type */
  12. typedef struct {
  13. uint16_t Humidity;
  14. int16_t Temperature;
  15. } aht20_t;
  16. /* Function */
  17. aht20_st_t AHT20_Init(void);
  18. aht20_st_t AHT20_StartMeasure(void);
  19. aht20_st_t AHT20_SoftReset(void);
  20. aht20_st_t AHT20_GetData(aht20_t * data);
  21. #endif /* _SENSOR_H_ */