12345678910111213141516171819202122232425 |
- #pragma once
- #ifndef _SENSOR_H_
- #define _SENSOR_H_
- /* Status code */
- typedef enum {
- AHT_St_OK = 0,
- AHT_St_Err,
- AHT_St_Bsy,
- AHT_St_CRC
- } aht20_st_t;
- /* Data type */
- typedef struct {
- uint16_t Humidity;
- int16_t Temperature;
- } aht20_t;
- /* Function */
- aht20_st_t AHT20_Init(void);
- aht20_st_t AHT20_StartMeasure(void);
- aht20_st_t AHT20_SoftReset(void);
- aht20_st_t AHT20_GetData(aht20_t * data);
- #endif /* _SENSOR_H_ */
|