-void signal(int count, int duration) {
- for (int i = 0; i < count; i++)
- one_blink(duration);
- sleep_ms(1000);
+static void button_pressed() {
+ /* This runs in interrupt context; don't linger. */
+ char zero = '\0';
+ /* We don't check for failure (full queue) here because there's not much to be
+ * done about it. */
+ queue_try_add(&queue, &zero);