79 #ifndef NZ_SENS_DHT_BLOCK_H
80 #define NZ_SENS_DHT_BLOCK_H
82 #if defined(SENS_DHT_BLOCK_ENABLE)
85 #define SENS_DHT_TYPE_DHT11 ( 1 )
86 #define SENS_DHT_TYPE_DHT22 ( 2 )
88 typedef struct __attribute__((__packed__)) SENS_DHT_
96 unsigned char type : 4;
97 unsigned char error : 1;
98 unsigned char hasData : 1;
99 unsigned char pwrSwtInverted : 1;
100 unsigned char fill7to7 : 1;
115 SENS_DHT_ERR_NONE = 0,
117 SENS_DHT_ERR_INVALID_PORT,
118 SENS_DHT_ERR_PORT_LOW,
119 SENS_DHT_ERR_NO_RESPONCE,
148 BYTE sensDht_init(WORD startupDelay, BYTE portPowerSwitch, BOOL powerSwitchInverted);
158 void sensDht_addSensor(BYTE portIdSens);
166 BOOL sensDht_isReady();
190 BYTE sensDht_read(BYTE type, BYTE portIdSens);
202 WORD sensDht_getHumidityX10(
void);
214 WORD sensDht_getHumidityInteger(
void);
226 WORD sensDht_getHumidityDecimal(
void);
238 WORD sensDht_getTemperatureX10(
void);
250 WORD sensDht_getTemperatureInteger(
void);
262 WORD sensDht_getTemperatureDecimal(
void);
269 #define sensDht_getStatus() (dhtInfo.status)
271 #endif //#if defined(SENS_DHT_BLOCK_ENABLE)
272 #endif //#ifndef NZ_SENS_DHT_BLOCK_H