altos: ADS124S0X driver compiles now
[fw/altos] / src / cortexelf-v1 / ao_cortexelf.c
index decd6ef57ad345a501f4e1cca4ea891c588cc52b..1c30cd85dda20a768642261c9a2d826c186ba07f 100644 (file)
@@ -27,7 +27,7 @@
 #include <ao_console.h>
 #include <ao_sdcard.h>
 #include <ao_fat.h>
-#include <ao_lisp.h>
+#include <ao_scheme.h>
 #include <ao_button.h>
 #include <ao_event.h>
 #include <ao_as1107.h>
@@ -149,17 +149,16 @@ ao_fb_init(void)
 static void
 ao_video_toggle(void)
 {
-       ao_cmd_decimal();
-       if (ao_cmd_lex_i)
+       uint16_t r = ao_cmd_decimal();
+       if (r)
                ao_fb_init();
-       ao_vga_enable(ao_cmd_lex_i);
+       ao_vga_enable(r)
 }
 
 static void
 ao_ball_toggle(void)
 {
-       ao_cmd_decimal();
-       ball_enable = ao_cmd_lex_i;
+       ball_enable = ao_cmd_decimal();
        ao_wakeup(&ball_enable);
 }
 
@@ -188,8 +187,8 @@ ao_console_send(void)
        }
 }
 
-static void lisp_cmd() {
-       ao_lisp_read_eval_print();
+static void scheme_cmd() {
+       ao_scheme_read_eval_print();
 }
 
 static void
@@ -208,23 +207,21 @@ led_cmd(void)
 {
        uint8_t start;
        uint8_t value;
-       ao_cmd_decimal();
 
-       start = ao_cmd_lex_i;
-       ao_cmd_hex();
-       value = ao_cmd_lex_i;
+       start = ao_cmd_decimal();
+       value = ao_cmd_hex();
        if (ao_cmd_status != ao_cmd_success)
                return;
        ao_as1107_write_8(start, value);
 }
 
-__code struct ao_cmds ao_demo_cmds[] = {
+const 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" },
+       { scheme_cmd, "l\0Run scheme interpreter" },
        { led_cmd, "L start value\0Show value (byte) at digit start" },
        { 0, NULL }
 };
@@ -275,7 +272,7 @@ main(void)
        ao_button_init();
 
        ao_as1107_init();
-
+       ao_matrix_init();
        ao_1802_init();
 
        ao_hex_init();