From 4dfc42565c2d1f5b900d8d725126bfde886a8423 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 20 Aug 2016 23:04:53 +0100 Subject: tidy --- app/serial.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'app/serial.c') diff --git a/app/serial.c b/app/serial.c index aa67dae..27307eb 100644 --- a/app/serial.c +++ b/app/serial.c @@ -1,30 +1,35 @@ #include "project.h" -void serial_poll(void) +void +serial_poll (void) { -uint8_t v; + uint8_t v; -if (!ring_read_byte (&rx2_ring, &v)) { -modem_byte(v); + if (!ring_read_byte (&rx2_ring, &v)) + { + modem_byte (v); //console_tx(&v,1); -} + } -if (!ring_read_byte (&rx1_ring, &v)) { + if (!ring_read_byte (&rx1_ring, &v)) + { -if (v=='@') { - toggle_fake_hook(); -} else if (v=='#') { - toggle_fake_hook(); - modem_send("ATDT120;"); -} else { + if (v == '@') + { + toggle_fake_hook (); + } + else if (v == '#') + { + toggle_fake_hook (); + modem_send ("ATDT120;"); + } + else + { - usart2_queue(v); -} -} + usart2_queue (v); + } + } } - - - -- cgit v1.2.3