aboutsummaryrefslogtreecommitdiffstats
path: root/buttons.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'buttons.hpp')
-rw-r--r--buttons.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/buttons.hpp b/buttons.hpp
new file mode 100644
index 0000000..43d2d25
--- /dev/null
+++ b/buttons.hpp
@@ -0,0 +1,17 @@
+#ifndef __BUTTONS_H__
+#define __BUTTONS_H__
+#include <stdio.h>
+
+// Init buttons used in conjuction with interrupts
+// All buttons are connected to ground.
+#define NUMBER_OF_BUTTONS 5
+#define BUTTON_HOME 22
+#define BUTTON_SELECT 18
+#define BUTTON_MODE 19
+#define BUTTON_DOWN 20
+#define BUTTON_UP 21
+
+void init_buttons();
+void gpio_interrupt_cb(uint gpio, uint32_t events);
+
+#endif \ No newline at end of file