diff options
Diffstat (limited to 'src/stm-flash/ao_stm_flash.c')
-rw-r--r-- | src/stm-flash/ao_stm_flash.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/stm-flash/ao_stm_flash.c b/src/stm-flash/ao_stm_flash.c index 617c6d79..16dd1189 100644 --- a/src/stm-flash/ao_stm_flash.c +++ b/src/stm-flash/ao_stm_flash.c @@ -17,25 +17,18 @@ #include "ao.h" #include <ao_exti.h> +#include <ao_boot.h> void -ao_panic(uint8_t c) +ao_panic(uint8_t reason) { + for (;;); } -void -ao_test(void) -{ - char c; - - for (;;) { - c = ao_usb_getchar(); - ao_usb_putchar(c); - ao_usb_flush(); - } -} - -struct ao_task ao_test_task; +__code struct ao_cmds ao_flash_cmds[] = { + { ao_reboot_application, "A\0Switch to application" }, + { 0, NULL }, +}; int main(void) @@ -47,6 +40,7 @@ main(void) // ao_exti_init(); ao_usb_init(); + ao_cmd_register(&ao_flash_cmds[0]); ao_start_scheduler(); return 0; } |