19 lines
366 B
C
19 lines
366 B
C
#ifndef __DHT21_H_
|
|
#define __DHT21_H_
|
|
|
|
#include "iot_gpio.h"
|
|
#include "iot_gpio_ex.h"
|
|
#include <stdint.h>
|
|
|
|
#define DHT11_DQ_GPIO 13
|
|
|
|
#define DHT11_DQ_OUT_OFF IoTGpioSetOutputVal(DHT11_DQ_GPIO, 0);
|
|
#define DHT11_DQ_OUT_ON IoTGpioSetOutputVal(DHT11_DQ_GPIO, 1);
|
|
|
|
|
|
void DHT21_Init(void);
|
|
uint8_t DHT21_onewire(uint16_t *tem,uint16_t *hum);
|
|
|
|
|
|
|
|
#endif |