2021-10-13 18:00:53 +08:00
|
|
|
/**
|
|
|
|
|
* @file aht20.h
|
|
|
|
|
* @author Myth
|
2021-10-15 00:21:49 +08:00
|
|
|
* @version 0.2
|
|
|
|
|
* @date 2021.10.15
|
2021-10-13 18:00:53 +08:00
|
|
|
* @brief AHT20 驱动
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __AHT20_H
|
|
|
|
|
#define __AHT20_H
|
|
|
|
|
|
|
|
|
|
#include "sys.h"
|
|
|
|
|
|
|
|
|
|
#define AHT20_GPIO GPIOB
|
|
|
|
|
#define AHT20_SDA_PIN GPIO_PIN_3
|
|
|
|
|
#define AHT20_SCL_PIN GPIO_PIN_4
|
|
|
|
|
|
|
|
|
|
void AHT20_Init(void);
|
2021-10-15 00:21:49 +08:00
|
|
|
void AHT20_Start(void);
|
2021-10-13 18:00:53 +08:00
|
|
|
uint8_t AHT20_Read(float *humi, float *temp);
|
2021-10-15 00:21:49 +08:00
|
|
|
uint8_t AHT20_StartAndRead(float *humi, float *temp);
|
2021-10-13 18:00:53 +08:00
|
|
|
|
|
|
|
|
#endif
|