summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include/keypad.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/firmware/include/keypad.h')
-rw-r--r--src/target/firmware/include/keypad.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/target/firmware/include/keypad.h b/src/target/firmware/include/keypad.h
index e2e6519f..9e9acfe9 100644
--- a/src/target/firmware/include/keypad.h
+++ b/src/target/firmware/include/keypad.h
@@ -1,30 +1,6 @@
#ifndef _KEYPAD_H
#define _KEYPAD_H
-enum buttons {
- BTN_0 = 0x00002000,
- BTN_1 = 0x00008000,
- BTN_2 = 0x00000400,
- BTN_3 = 0x00000020,
- BTN_4 = 0x00010000,
- BTN_5 = 0x00000800,
- BTN_6 = 0x00000040,
- BTN_7 = 0x00020000,
- BTN_8 = 0x00001000,
- BTN_9 = 0x00000080,
- BTN_STAR = 0x00040000,
- BTN_HASH = 0x00000100,
- BTN_MENU = 0x00004000,
- BTN_LEFT_SB = 0x00080000,
- BTN_RIGHT_SB = 0x00000200,
- BTN_UP = 0x00000002,
- BTN_DOWN = 0x00000004,
- BTN_LEFT = 0x00000008,
- BTN_RIGHT = 0x00000010,
- BTN_OK = 0x00000001,
- BTN_POWER = 0x01000000,
-};
-
enum key_codes {
KEY_0 = 0,
KEY_1,
@@ -47,15 +23,19 @@ enum key_codes {
KEY_RIGHT,
KEY_OK, //green off-hook
KEY_POWER, //red on-hook
+ KEY_MINUS,
+ KEY_PLUS,
KEY_INV = 0xFF
};
+#define BUTTON_CNT 23
+
enum key_states {
PRESSED,
RELEASED,
};
-void keypad_init(uint8_t interrupts);
+void keypad_init(const uint8_t *keymap, uint8_t interrupts);
void keypad_poll();