diff options
Diffstat (limited to 'firmware/export/button.h')
-rw-r--r-- | firmware/export/button.h | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/firmware/export/button.h b/firmware/export/button.h index e3c37f9382..d6503d93b7 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -30,8 +30,49 @@ void button_init (void); | |||
30 | int button_get (bool block); | 30 | int button_get (bool block); |
31 | int button_get_w_tmo(int ticks); | 31 | int button_get_w_tmo(int ticks); |
32 | 32 | ||
33 | /* Shared button codes */ | ||
34 | #define BUTTON_NONE 0x0000 | 33 | #define BUTTON_NONE 0x0000 |
34 | |||
35 | #ifdef HAVE_NEO_KEYPAD | ||
36 | |||
37 | #define BUTTON_UP 0x0080 | ||
38 | #define BUTTON_DOWN 0x0010 | ||
39 | #define BUTTON_LEFT 0x0001 | ||
40 | #define BUTTON_RIGHT 0x0002 | ||
41 | |||
42 | #define BUTTON_SELECT 0x0040 | ||
43 | #define BUTTON_PROGRAM 0x0020 | ||
44 | #define BUTTON_MENU 0x0004 | ||
45 | #define BUTTON_PLAY 0x0008 | ||
46 | #define BUTTON_STOP 0x0100 | ||
47 | |||
48 | #define BUTTON_IR 0x2000 | ||
49 | #define BUTTON_REPEAT 0x4000 | ||
50 | #define BUTTON_REL 0x8000 | ||
51 | |||
52 | #define BUTTON_FLAG_MASK 0xF000 | ||
53 | #define BUTTON_MASK 0x0FFF | ||
54 | #define BUTTON_ALL BUTTON_MASK | ||
55 | #define BUTTON_ALL_FLAGS BUTTON_FLAG_MASK | ||
56 | |||
57 | #define NEO_IR_BUTTON_POWER 0x0001 | ||
58 | #define NEO_IR_BUTTON_SETTING 0x0002 | ||
59 | #define NEO_IR_BUTTON_REWIND 0x0004 | ||
60 | #define NEO_IR_BUTTON_FFORWARD 0x0008 | ||
61 | #define NEO_IR_BUTTON_PLAY 0x0010 | ||
62 | #define NEO_IR_BUTTON_VOLUP 0x0020 | ||
63 | #define NEO_IR_BUTTON_VOLDN 0x0040 | ||
64 | #define NEO_IR_BUTTON_BROWSE 0x0080 | ||
65 | #define NEO_IR_BUTTON_EQ 0x0100 | ||
66 | #define NEO_IR_BUTTON_MUTE 0x0200 | ||
67 | #define NEO_IR_BUTTON_PROGRAM 0x0400 | ||
68 | #define NEO_IR_BUTTON_STOP 0x0800 | ||
69 | #define NEO_IR_BUTTON_NONE 0x0000 | ||
70 | |||
71 | #define NEO_IR_BUTTON_REPEAT 0x1000 | ||
72 | |||
73 | #else | ||
74 | |||
75 | /* Shared button codes */ | ||
35 | #define BUTTON_ON 0x0001 | 76 | #define BUTTON_ON 0x0001 |
36 | #define BUTTON_UP 0x0010 | 77 | #define BUTTON_UP 0x0010 |
37 | #define BUTTON_DOWN 0x0020 | 78 | #define BUTTON_DOWN 0x0020 |
@@ -69,4 +110,7 @@ int button_get_w_tmo(int ticks); | |||
69 | 110 | ||
70 | #endif /* HAVE_PLAYER_KEYPAD */ | 111 | #endif /* HAVE_PLAYER_KEYPAD */ |
71 | 112 | ||
72 | #endif | 113 | #endif /* HAVE_NEO_KEYPAD */ |
114 | |||
115 | #endif /* _BUTTON_H_ */ | ||
116 | |||