altos: Make cmd number parsing functions return value
[fw/altos] / src / stm-vga / ao_demo.c
index 63740f8e9f35e2a8e784695fcaf44561668ccbb3..593a87439a93ba75b79e813114df72032763de99 100644 (file)
@@ -159,17 +159,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);
 }