X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcortexelf-v1%2Fao_cortexelf.c;fp=src%2Fcortexelf-v1%2Fao_cortexelf.c;h=f9be59e835a11e7e78be52493f95f2cefac4b8c6;hb=8284d3639cd24e2fa0faf1e35e7276ba35a24f8f;hp=1dc0a4be0180fc0d33f8784e9ca1e07abe9d4174;hpb=6fb817f218a69b28973b0d059d71809717b1e2d1;p=fw%2Faltos diff --git a/src/cortexelf-v1/ao_cortexelf.c b/src/cortexelf-v1/ao_cortexelf.c index 1dc0a4be..f9be59e8 100644 --- a/src/cortexelf-v1/ao_cortexelf.c +++ b/src/cortexelf-v1/ao_cortexelf.c @@ -187,11 +187,23 @@ static void lisp_cmd() { ao_lisp_read_eval_print(); } +static void +ao_serial_blather(void) +{ + char c; + + while ((c = getchar()) != '~') { + ao_serial1_putchar(c); + ao_serial2_putchar(c); + } +} + __code struct ao_cmds ao_demo_cmds[] = { { ao_video_toggle, "V\0Toggle video" }, { ao_ball_toggle, "B\0Toggle ball" }, { ao_ps2_read_keys, "K\0Read keys from keyboard" }, { ao_console_send, "C\0Send data to console, end with ~" }, + { ao_serial_blather, "S\0Blather on serial ports briefly" }, { lisp_cmd, "l\0Run lisp interpreter" }, { 0, NULL } };