diff options
| author | Keith Packard <keithp@keithp.com> | 2018-08-15 19:13:45 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2018-10-13 08:22:50 -0700 |
| commit | c417ab1de2a083b5fcff2e081e4feb2a65887903 (patch) | |
| tree | 614c7564321ea38402883992daeaea8f30bfe6b1 /src/stm-vga/ao_demo.c | |
| parent | c6e57291d91f1f6c4de5c54a5cfd3eef66d9f830 (diff) | |
altos: Make cmd number parsing functions return value
Don't use a global variable to hold the result.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm-vga/ao_demo.c')
| -rw-r--r-- | src/stm-vga/ao_demo.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/stm-vga/ao_demo.c b/src/stm-vga/ao_demo.c index 63740f8e..593a8743 100644 --- a/src/stm-vga/ao_demo.c +++ b/src/stm-vga/ao_demo.c @@ -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); } |
