diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-04-15 10:35:11 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-04-15 10:35:11 +0000 |
commit | 5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553 (patch) | |
tree | 0bf60b83aad534757330162ad4f683f142955ccb /firmware/target/arm/tcc780x/cowond2 | |
parent | 50851794a6bdd585ce70ecb430b1f798fb90936b (diff) | |
download | rockbox-5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553.tar.gz rockbox-5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553.zip |
Setup the touchpads to have two modes - stylus and button - and set them in button mode by default.
in button mode the touchpad is split into a 3x3 grid for 9 seperate buttons which can be used by the action system like real buttons.
Unify the keymap file for the touchpads in button mode. the target keymap file only needs to worry about real buttons.
(As these ports mature each screen will need to be fixed seperatly to be able to use stylus mode (the lists can already but don't change mode just yet.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17114 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc780x/cowond2')
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/button-target.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/button-target.h b/firmware/target/arm/tcc780x/cowond2/button-target.h index 3ccf70cffd..573ab03a11 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-target.h +++ b/firmware/target/arm/tcc780x/cowond2/button-target.h | |||
@@ -35,14 +35,25 @@ int button_read_device(void); | |||
35 | #define BUTTON_MINUS 0x00000004 | 35 | #define BUTTON_MINUS 0x00000004 |
36 | #define BUTTON_MENU 0x00000008 | 36 | #define BUTTON_MENU 0x00000008 |
37 | 37 | ||
38 | /* compatibility hacks | ||
39 | not mapped to the touchpad button areas because | ||
40 | the touchpad is not always in that mode */ | ||
41 | #define BUTTON_LEFT BUTTON_MINUS | ||
42 | #define BUTTON_RIGHT BUTTON_PLUS | ||
43 | |||
38 | /* Faked buttons based on touchscreen quadrants (not yet read) */ | 44 | /* Faked buttons based on touchscreen quadrants (not yet read) */ |
39 | #define BUTTON_UP 0x00000020 | 45 | /* Touchpad Screen Area Buttons */ |
40 | #define BUTTON_DOWN 0x00000040 | 46 | #define BUTTON_TOPLEFT 0x00000010 |
41 | #define BUTTON_LEFT 0x00000080 | 47 | #define BUTTON_TOPMIDDLE 0x00000020 |
42 | #define BUTTON_RIGHT 0x00000100 | 48 | #define BUTTON_TOPRIGHT 0x00000040 |
43 | #define BUTTON_SELECT 0x00000200 | 49 | #define BUTTON_MIDLEFT 0x00000080 |
50 | #define BUTTON_CENTER 0x00000100 | ||
51 | #define BUTTON_MIDRIGHT 0x00000200 | ||
52 | #define BUTTON_BOTTOMLEFT 0x00000400 | ||
53 | #define BUTTON_BOTTOMMIDDLE 0x00000800 | ||
54 | #define BUTTON_BOTTOMRIGHT 0x00001000 | ||
44 | 55 | ||
45 | #define BUTTON_MAIN 0x3FF | 56 | #define BUTTON_MAIN 0x1FFF |
46 | 57 | ||
47 | /* No remote */ | 58 | /* No remote */ |
48 | #define BUTTON_REMOTE 0 | 59 | #define BUTTON_REMOTE 0 |