-const struct ao_cmds ao_spi_cmds[] = {
- { ao_spi_test, "s \0Send some bytes over spi" },
+static void
+ao_button(void)
+{
+ ao_exti_setup(&samd21_port_a, 10, AO_EXTI_MODE_FALLING | AO_EXTI_MODE_PULL_UP, ao_button_callback);
+ ao_exti_enable(&samd21_port_a, 10);
+ for (;;) {
+ ao_arch_block_interrupts();
+ pressed = 0;
+ while (!pressed)
+ ao_sleep(&pressed);
+ ao_arch_release_interrupts();
+ ao_beep_test();
+ }
+}
+
+static struct ao_task ao_button_task;
+
+const struct ao_cmds ao_test_cmds[] = {
+ { ao_beep_test, "b \0beep" },