You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
502 B
35 lines
502 B
#ifndef __DHT11_H |
|
#define __DHT11_H |
|
#include "sys.h" |
|
|
|
|
|
//IO方向设置 |
|
void DHT11_IO_IN(void); |
|
void DHT11_IO_OUT(void); |
|
////IO操作函数 |
|
#define DHT11_DQ_OUT PBout(15) //数据端口 |
|
#define DHT11_DQ_IN PBin(15) //数据端口 |
|
|
|
|
|
u8 DHT11_Init(void);//初始化DHT11 |
|
u8 DHT11_Read_Data(u8 *temp,u8 *humi);//读取温湿度 |
|
u8 DHT11_Read_Byte(void);//读出一个字节 |
|
u8 DHT11_Read_Bit(void);//读出一个位 |
|
u8 DHT11_Check(void);//检测是否存在DHT11 |
|
void DHT11_Rst(void);//复位DHT11 |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|