summaryrefslogtreecommitdiff
path: root/12key-arduino/ModeMenu.h
diff options
context:
space:
mode:
Diffstat (limited to '12key-arduino/ModeMenu.h')
-rw-r--r--12key-arduino/ModeMenu.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/12key-arduino/ModeMenu.h b/12key-arduino/ModeMenu.h
new file mode 100644
index 0000000..7203b30
--- /dev/null
+++ b/12key-arduino/ModeMenu.h
@@ -0,0 +1,13 @@
+#include <Arduino.h>
+#include "Mode.h"
+
+
+class ModeMenu : public Mode {
+ void reset() {}
+ Mode * update(unsigned int keys) {
+ if (keys & KEY_1) return Mode::modes[1];
+ if (keys & KEY_2) return Mode::modes[2];
+ if (keys & KEY_3) return Mode::modes[3];
+ return NULL;
+ }
+};