projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a995d73
)
Debug bits for telebt
author
Keith Packard
<keithp@keithp.com>
Mon, 25 Apr 2016 15:47:45 +0000
(11:47 -0400)
committer
Keith Packard
<keithp@keithp.com>
Mon, 25 Apr 2016 15:47:45 +0000
(11:47 -0400)
src/stm/ao_serial_stm.c
patch
|
blob
|
history
diff --git
a/src/stm/ao_serial_stm.c
b/src/stm/ao_serial_stm.c
index 88f2d0299ecf65f1b350dde44e0ede1d744c7c1f..9959e460771d6fb67d0318e333aaca961cdfb036 100644
(file)
--- 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;
uint8_t u;
ao_fifo_remove(usart->rx_fifo,u);
c = u;
+ ao_usb_putchar(c); ao_usb_flush();
}
return c;
}
}
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();
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;
}
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)
{
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);
ao_arch_block_interrupts();
while (ao_fifo_full(usart->tx_fifo))
ao_sleep(&usart->tx_fifo);