added input handling
[gbajam21] / src / input.h
diff --git a/src/input.h b/src/input.h
new file mode 100644 (file)
index 0000000..3ed22a0
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef INPUT_H_
+#define INPUT_H_
+
+#include <stdint.h>
+
+enum {
+       BN_A            = 0x0001,
+       BN_B            = 0x0002,
+       BN_SELECT       = 0x0004,
+       BN_START        = 0x0008,
+       BN_RIGHT        = 0x0010,
+       BN_LEFT         = 0x0020,
+       BN_UP           = 0x0040,
+       BN_DOWN         = 0x0080,
+       BN_RT           = 0x0100,
+       BN_LT           = 0x0200
+};
+
+#define BN_DPAD        (BN_RIGHT | BN_LEFT | BN_UP | BN_DOWN)
+
+void select_input(uint16_t bmask);
+uint16_t get_input(void);
+
+#endif /* INPUT_H_ */