X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fmegametrum-v0.1%2Fao_megametrum.c;h=9efde5986e931807a0e68ff066f58bb27a48657e;hb=93ef7e4a23d13540615f1a9782e1d58ddb7f258e;hp=0d88f4c1319164d85123ce915d5b2a6824611466;hpb=9b12bc445fe482306e4587ad60c6d2daf65a60f3;p=fw%2Faltos diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c index 0d88f4c1..9efde598 100644 --- a/src/megametrum-v0.1/ao_megametrum.c +++ b/src/megametrum-v0.1/ao_megametrum.c @@ -17,6 +17,21 @@ #include "ao.h" +void +beep(void) +{ + ao_beep(AO_BEEP_MID); + printf ("Hit a character to stop..."); flush(); + getchar(); + putchar('\n'); + ao_beep(0); +} + +const struct ao_cmds ao_mm_cmds[] = { + { beep, "b\0Beep" }, + { 0, NULL }, +}; + int main(void) { @@ -32,7 +47,12 @@ main(void) ao_dma_init(); ao_spi_init(); ao_ms5607_init(); + ao_beep_init(); + ao_adc_init(); + ao_storage_init(); + ao_usb_init(); + ao_cmd_register(&ao_mm_cmds[0]); ao_start_scheduler(); return 0; }