summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sonynwz/button-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/sonynwz/button-target.h')
-rw-r--r--firmware/target/hosted/sonynwz/button-target.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/firmware/target/hosted/sonynwz/button-target.h b/firmware/target/hosted/sonynwz/button-target.h
index 6cf915b4ad..5070728236 100644
--- a/firmware/target/hosted/sonynwz/button-target.h
+++ b/firmware/target/hosted/sonynwz/button-target.h
@@ -24,6 +24,40 @@
24#include <stdbool.h> 24#include <stdbool.h>
25#include "config.h" 25#include "config.h"
26 26
27/* The NWZ-A860 is completely different, it has a touchscreen and some but not
28 * all keys of the other others */
29#if defined(SONY_NWZA860)
30
31/* Main unit's buttons */
32#define BUTTON_BACK 0x00000001 /* HOME */
33#define BUTTON_PLAY 0x00000002
34#define BUTTON_REW 0x00000004
35#define BUTTON_FF 0x00000008
36#define BUTTON_VOL_DOWN 0x00000010
37#define BUTTON_VOL_UP 0x00000020
38/* For compatibility */
39#define BUTTON_LEFT BUTTON_MIDLEFT
40#define BUTTON_RIGHT BUTTON_MIDRIGHT
41#define BUTTON_UP BUTTON_TOPMIDDLE
42#define BUTTON_DOWN BUTTON_BOTTOMMIDDLE
43
44/* Touch Screen Area Buttons */
45#define BUTTON_TOPLEFT 0x00000040
46#define BUTTON_TOPMIDDLE 0x00000080
47#define BUTTON_TOPRIGHT 0x00000100
48#define BUTTON_MIDLEFT 0x00000200
49#define BUTTON_CENTER 0x00000400
50#define BUTTON_MIDRIGHT 0x00000800
51#define BUTTON_BOTTOMLEFT 0x00001000
52#define BUTTON_BOTTOMMIDDLE 0x00002000
53#define BUTTON_BOTTOMRIGHT 0x00004000
54
55#define BUTTON_MAIN 0x7fff
56
57#define POWEROFF_BUTTON BUTTON_BACK
58
59#else /* SONY_NWZA860 */
60
27/* Main unit's buttons */ 61/* Main unit's buttons */
28#define BUTTON_POWER 0x00000001 62#define BUTTON_POWER 0x00000001
29#define BUTTON_BACK 0x00000002 63#define BUTTON_BACK 0x00000002
@@ -37,8 +71,11 @@
37 71
38#define BUTTON_MAIN 0x000001ff 72#define BUTTON_MAIN 0x000001ff
39 73
74#define POWEROFF_BUTTON BUTTON_POWER
75
76#endif /* SONY_NWZA860 */
77
40/* Software power-off */ 78/* Software power-off */
41#define POWEROFF_BUTTON BUTTON_POWER
42#define POWEROFF_COUNT 10 79#define POWEROFF_COUNT 10
43 80
44/* force driver to reload button state (useful after suspend) */ 81/* force driver to reload button state (useful after suspend) */