usart/test/main.cpp

22 lines
334 B
C++
Raw Normal View History

2020-12-10 01:58:46 +00:00
#include <avr/io.h>
#include <avr/interrupt.h>
2020-12-10 04:16:38 +00:00
#include "../src/usart.h"
2020-12-10 01:58:46 +00:00
#include <util/delay.h>
int main (void) {
DDRD |= (1<<PD3)|(1<<PD4)|(1<<PD5);
usart::init(9600);
for (;;) {// Loop forever
usart::put('A');
//printf("Hello");
PORTD ^= (1<<PD3)|(1<<PD4)|(1<<PD5);
_delay_ms(1000);
}
}