summaryrefslogtreecommitdiffstats
path: root/stm32/app/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'stm32/app/cmd.c')
-rw-r--r--stm32/app/cmd.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/stm32/app/cmd.c b/stm32/app/cmd.c
deleted file mode 100644
index 7e1975a..0000000
--- a/stm32/app/cmd.c
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "project.h"
-
-
-static void cmd_dispatch (char *cmd)
-{
-
- printf ("Q received cmd %s\r\n", cmd);
-
- if (!strncmp (cmd, "CH=", 3)) {
- ot_override_ch = atoi (cmd + 3);
- printf ("Q CH override set to %d\r\n", ot_override_ch);
- }
-
-
- if (!strncmp (cmd, "DHW=", 4)) {
- ot_override_dhw = atoi (cmd + 4);
- printf ("Q DHW override set to %d\r\n", ot_override_dhw);
- }
-
- if (!strcmp (cmd, "PIC")) {
- ot_override_dhw = atoi (cmd + 4);
- printf ("Q Entering PIC mode, reset to leave\r\n");
- pic_passthru();
- }
-
-}
-
-
-void cmd_usart_dispatch (void)
-{
- static char cmd[16];
- static unsigned cmd_ptr;
-
- uint8_t c;
-
- if (ring_read_byte (&rx1_ring, &c))
- return;
-
-
- if ((c == '\n') || (c == '\r')) {
- if (cmd_ptr)
- cmd_dispatch (cmd);
-
- cmd_ptr = 0;
- return;
- }
-
-
- if (cmd_ptr < (sizeof (cmd) - 1)) {
- cmd[cmd_ptr++] = c;
- cmd[cmd_ptr] = 0;
- }
-}
-
-