Uhr/Zahl/Zahl/Zahl.cpp
2013-12-10 17:09:51 +00:00

45 lines
722 B
C++

/*
* Zahl.cpp
*
* Created: 09.12.2013 23:15:37
* Author: netz
*/
#include "config.h"
#include "Led.hpp"
#include "uart.hpp"
#include "portb.hpp"
///////////////////////// UART ////////////////////////////////////
typedef Uart<9600, 9> uartclass;
uartclass u;
///////////////////////// LED /////////////////////////////////////
typedef Led<avrlib::portb> ledclass;
ledclass l;
int main(void)
{
sei();
l.setNum(0);
l.setDim(0xAC);
uint8_t i = 0;
while(1)
{
u.send("bla..\n");
l.setNum(i++);
_delay_ms(500);
if(i > 15) {
i = 0;
}
}
}
ISR(TIMER0_OVF_vect) {
l.timer();
}
/*ISR(USART_RX_vect) {
//u.interrupt();
PORTB ^= 0xFF;
}*/