Subversion Repositories group.electronics

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
126 pfowler 1
/*
2
 * dht.h
3
 *
4
 *  Created on: 29/11/2013
5
 *      Author: pfowler
6
 */
7
 
8
#ifndef DHT_H_
9
#define DHT_H_
10
 
11
#define DHT11	11
12
#define DHT21	21
13
#define DHT22	22
14
#define AM2301	21
15
 
16
struct {
17
	uint8_t port;
18
	uint8_t pin;
19
	uint8_t type;
20
	uint8_t count;
21
	uint8_t first;
22
	uint32_t last;
23
	uint8_t* data;
24
} dht;
25
 
26
extern volatile uint32_t systime;
27
 
28
uint8_t dht_read();
29
void dht_init(uint8_t port, uint8_t pin, uint8_t type, uint8_t count);
30
float dht_readTemp();
31
 
32
#endif /* DHT_H_ */