summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-07-18 01:05:33 -0700
committerKeith Packard <keithp@keithp.com>2009-07-18 01:05:33 -0700
commitfbcb7b20fa701a6e534d38e307839466545668e3 (patch)
treedd5c17dc0256591e0ec08a22f4262b80db18d8e5 /src
parent91b023e7e4eeed838e0320d2ddac0f6aac39e565 (diff)
Add B command to set serial baud rate
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/ao_serial.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ao_serial.c b/src/ao_serial.c
index 4155e776..59110354 100644
--- a/src/ao_serial.c
+++ b/src/ao_serial.c
@@ -99,9 +99,17 @@ monitor_serial(void)
serial_echo = ao_cmd_lex_i != 0;
}
+static void
+serial_baud(void)
+{
+ ao_cmd_hex();
+ ao_serial_set_speed(ao_cmd_lex_i);
+}
+
__code struct ao_cmds ao_serial_cmds[] = {
{ 'S', send_serial, "S <data> Send data to serial line" },
{ 'M', monitor_serial, "M <enable> Monitor serial data" },
+ { 'B', serial_baud, "B <0 = 4800, 1 = 57600> Set serial baud rate" },
{ 0, send_serial, NULL },
};