summaryrefslogtreecommitdiffstats
path: root/app/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/serial.c')
-rw-r--r--app/serial.c41
1 files changed, 23 insertions, 18 deletions
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);
+ }
+ }
}
-
-
-