From b0d8f22f3492fbb3f6dc0e8026e63c803af59007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 17 Oct 2015 15:40:51 +0200 Subject: Complete commit of current work --- examples/dht22usart/dht22.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 examples/dht22usart/dht22.c (limited to 'examples/dht22usart/dht22.c') diff --git a/examples/dht22usart/dht22.c b/examples/dht22usart/dht22.c new file mode 100644 index 0000000..97a91ee --- /dev/null +++ b/examples/dht22usart/dht22.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "../../usart.h" +#include "../../sensor_dht22.h" + +void rec(uint8_t data) { + if (data == '\r') { + // TODO read sensor and send data + } +} + +const struct dht22_port dht22_ports[] = { + {&DDRC, &PORTC, &PINC, _BV(PORTC4), NULL, 0} +}; + +int main() { + //usart_async_open(); + //sei(); + //usart_receive = rec; + //dht22_init(0); + + timer_init(COUNTER0_PWM); + while (1); +} -- cgit v1.2.3