LED driver work

This commit is contained in:
Mark Qvist 2019-01-12 15:12:51 +01:00
parent c22123b953
commit 372264d379
12 changed files with 162 additions and 29 deletions

View file

@ -36,6 +36,7 @@ bool serial_available(uint8_t index) {
int uart0_putchar(char c, FILE *stream) {
LED_COM_ON();
loop_until_bit_is_set(UCSR0A, UDRE0);
UDR0 = c;
return 1;
@ -53,6 +54,7 @@ char uart0_getchar_nowait(void) {
ISR(USART0_RX_vect) {
if (serial_available(0)) {
LED_COM_ON();
char c = uart0_getchar_nowait();
fifo_push(&serialFIFO, c);
}