Subversion Repositories group.electronics

Rev

Rev 128 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 * dht.h
 *
 *  Created on: 29/11/2013
 *      Author: pfowler
 */

#ifndef DHT_H_
#define DHT_H_

#define DHT11   11
#define DHT21   21
#define DHT22   22
#define AM2301  21

struct {
        uint8_t port;
        uint8_t pin;
        uint8_t type;
        uint8_t count;
        uint8_t first;
        uint32_t last;
        uint8_t* data;
} dht;

extern volatile uint32_t systime;

uint8_t dht_read();
void dht_init(uint8_t port, uint8_t pin, uint8_t type, uint8_t count);
float dht_readTemp();

#endif /* DHT_H_ */