interrupt driven sending
This commit is contained in:
@ -21,9 +21,10 @@ void uartdrvInit() {
|
|||||||
UCSRB = (1 << TXEN);
|
UCSRB = (1 << TXEN);
|
||||||
// 8 data bit, no parity, 1 stop bit
|
// 8 data bit, no parity, 1 stop bit
|
||||||
UCSRC = (1 << UCSZ1) | (1 << UCSZ0);
|
UCSRC = (1 << UCSZ1) | (1 << UCSZ0);
|
||||||
// 115200 Baud @ 16MHz
|
// 2400 Baud @ 16MHz
|
||||||
UBRRL = 0xa0;
|
UBRRL = 0xa0;
|
||||||
UBRRH = 0x01;;
|
UBRRH = 0x01;;
|
||||||
|
|
||||||
FILE *mystdout = fdevopen(uartdrvPutchar, NULL);
|
FILE *mystdout = fdevopen(uartdrvPutchar, NULL);
|
||||||
stdout = mystdout;
|
stdout = mystdout;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user