X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmegametrum-v0.1%2Fao_megametrum.c;h=4d9343e1cdcd6a1ea7010d658b9a5aff511794f3;hb=51aef5d4fc29986353ad887f4a67ed2fe35f8c8e;hp=02fe91fe69aa0f898c50aa5d4761674948d58707;hpb=a41628c97e90770890cce1d6f580e92c1cad1a7f;p=fw%2Faltos diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c index 02fe91fe..4d9343e1 100644 --- a/src/megametrum-v0.1/ao_megametrum.c +++ b/src/megametrum-v0.1/ao_megametrum.c @@ -17,6 +17,17 @@ #include "ao.h" +void +beep(void) +{ + ao_beep_for(AO_BEEP_MID, AO_MS_TO_TICKS(2000)); +} + +const struct ao_cmds ao_mm_cmds[] = { + { beep, "b\0Beep" }, + { 0, NULL }, +}; + int main(void) { @@ -32,8 +43,10 @@ main(void) ao_dma_init(); ao_spi_init(); ao_ms5607_init(); + ao_beep_init(); ao_adc_init(); + ao_cmd_register(&ao_mm_cmds[0]); ao_start_scheduler(); return 0; }