diff options
author | root <root@lamia.panaceas.james.local> | 2015-06-07 01:34:12 +0100 |
---|---|---|
committer | root <root@lamia.panaceas.james.local> | 2015-06-07 01:34:12 +0100 |
commit | 3accd8fcee87299b51de0abde3c8d9c83368d871 (patch) | |
tree | 0381019b06130ad1089ddc148d01a43163fc7978 /app/usart.c | |
parent | 43443ee9ba206b0963c49123bd03c250ed8e7b26 (diff) | |
download | tims_keyboard-3accd8fcee87299b51de0abde3c8d9c83368d871.tar.gz tims_keyboard-3accd8fcee87299b51de0abde3c8d9c83368d871.tar.bz2 tims_keyboard-3accd8fcee87299b51de0abde3c8d9c83368d871.zip |
tidyup
Diffstat (limited to 'app/usart.c')
-rw-r--r-- | app/usart.c | 20 |
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); |