summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-04-25 11:47:45 -0400
committerKeith Packard <keithp@keithp.com>2016-04-25 11:47:45 -0400
commiteee2ca7fa7fd77be8ca5806cad7e250053465048 (patch)
treeffb8c5a1f773e6810ff20151dd0f9dfacb647439
parenta995d73838c8e7ec5126e563baa2e59d5e071b28 (diff)
Debug bits for telebt
-rw-r--r--src/stm/ao_serial_stm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stm/ao_serial_stm.c b/src/stm/ao_serial_stm.c
index 88f2d029..9959e460 100644
--- a/src/stm/ao_serial_stm.c
+++ b/src/stm/ao_serial_stm.c
@@ -70,6 +70,7 @@ _ao_usart_pollchar(struct ao_stm_usart *usart)
uint8_t u;
ao_fifo_remove(usart->rx_fifo,u);
c = u;
+ ao_usb_putchar(c); ao_usb_flush();
}
return c;
}
@@ -82,6 +83,7 @@ ao_usart_getchar(struct ao_stm_usart *usart)
while ((c = _ao_usart_pollchar(usart)) == AO_READ_AGAIN)
ao_sleep(&usart->rx_fifo);
ao_arch_release_interrupts();
+ ao_usb_putchar(c); ao_usb_flush();
return (char) c;
}
@@ -94,6 +96,7 @@ _ao_usart_sleep_for(struct ao_stm_usart *usart, uint16_t timeout)
void
ao_usart_putchar(struct ao_stm_usart *usart, char c)
{
+ ao_usb_putchar(c); ao_usb_flush();
ao_arch_block_interrupts();
while (ao_fifo_full(usart->tx_fifo))
ao_sleep(&usart->tx_fifo);