1234567891011121314151617181920212223242526272829 |
- #pragma once
- #ifndef _AHTxx_H_
- #define _AHTxx_H_
- #include <SmingCore.h>
- /* Status code */
- typedef enum {
- St_OK = 0,
- St_DataToLong = 1,
- St_NACK_Addr = 2,
- St_NACK_Data = 3,
- St_Error = 4,
- St_Timeout = 5,
- St_NoSensor
- } ahtxx_st_t;
- /* Data type */
- typedef struct {
- uint16_t Humidity;
- int16_t Temperature;
- ahtxx_st_t Error;
- } ahtxx_t;
- void AHTxx_Init(void);
- void AHTxx_GetData(ahtxx_t * data);
- void AHTxx_SoftReset(void);
- #endif /* _AHTxxH_ */
|