AHTxx.h 463 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #ifndef _AHTxx_H_
  3. #define _AHTxx_H_
  4. #include <SmingCore.h>
  5. /* Status code */
  6. typedef enum {
  7. St_OK = 0,
  8. St_DataToLong = 1,
  9. St_NACK_Addr = 2,
  10. St_NACK_Data = 3,
  11. St_Error = 4,
  12. St_Timeout = 5,
  13. St_NoSensor
  14. } ahtxx_st_t;
  15. /* Data type */
  16. typedef struct {
  17. uint16_t Humidity;
  18. int16_t Temperature;
  19. ahtxx_st_t Error;
  20. } ahtxx_t;
  21. void AHTxx_Init(void);
  22. void AHTxx_GetData(ahtxx_t * data);
  23. void AHTxx_SoftReset(void);
  24. #endif /* _AHTxxH_ */