summaryrefslogtreecommitdiffstats
path: root/app/usart.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/usart.c')
-rw-r--r--app/usart.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/usart.c b/app/usart.c
index 74e5383..1a97105 100644
--- a/app/usart.c
+++ b/app/usart.c
@@ -27,7 +27,7 @@ usart1_isr (void)
((USART_SR (USART1) & USART_SR_RXNE) != 0))
{
data = usart_recv (USART1);
- ring_write_byte(&rx1_ring,data);
+ ring_write_byte (&rx1_ring, data);
}
/* Check if we were called because of TXE. */
@@ -37,8 +37,8 @@ usart1_isr (void)
if (ring_read_byte (&tx1_ring, &data))
{
- /*No more data, Disable the TXE interrupt, it's no longer needed. */
- usart_disable_tx_interrupt(USART1);
+ /*No more data, Disable the TXE interrupt, it's no longer needed. */
+ usart_disable_tx_interrupt (USART1);
}
else
{
@@ -53,7 +53,7 @@ void
usart1_queue (uint8_t d)
{
ring_write_byte (&tx1_ring, d);
- usart_enable_tx_interrupt(USART1);
+ usart_enable_tx_interrupt (USART1);
}
void
@@ -64,13 +64,13 @@ usart1_drain (void)
int
-usart1_write (char *ptr, int len,int blocking)
+usart1_write (char *ptr, int len, int blocking)
{
int ret;
- ret = ring_write (&tx1_ring, (uint8_t *) ptr, len,blocking);
- usart_enable_tx_interrupt(USART1);
- return ret;
+ ret = ring_write (&tx1_ring, (uint8_t *) ptr, len, blocking);
+ usart_enable_tx_interrupt (USART1);
+ return ret;
}
@@ -83,8 +83,8 @@ usart_init (void)
nvic_enable_irq (NVIC_USART1_IRQ);
- MAP_AF(USART1_TX);
- MAP_AF_PU(USART1_RX);
+ MAP_AF (USART1_TX);
+ MAP_AF_PU (USART1_RX);
usart_set_baudrate (USART1, 38400);