Das Wunder

This commit is contained in:
Tristan Krause 2019-04-02 16:19:42 +02:00
parent 9414322a19
commit 4d2ea6013c
8 changed files with 360 additions and 348 deletions

View file

@ -7,9 +7,7 @@
#include "requests.h"
#define WDT_TIMEOUT WDTO_1S
void handleRequest(void);
#define WDT_TIMEOUT WDTO_15MS
void initAll()
{
@ -22,7 +20,7 @@ void initAll()
((MCP23S17*) &sw)->setDirB(0xFF); // alle Eingang
((ADU*) &adu)->init();
usart.init(&handleRequest);
usart.init();
usart.initRX();
// aktiviere Interrupts
@ -112,7 +110,12 @@ int main()
while(1)
{
_delay_ms(10);
if(nextRequest)
{
nextRequest = false;
handleRequest();
}
_delay_us(1);
}
return 0;