diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/button-cowond2.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/button-target.h | 11 |
2 files changed, 16 insertions, 5 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c index 12fafe6c8c..ea37893f40 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c @@ -22,6 +22,16 @@ #include "button.h" #include "adc.h" +static enum touchpad_mode current_mode = TOUCHPAD_POINT; +void touchpad_set_mode(enum touchpad_mode mode) +{ + current_mode = mode; +} +enum touchpad_mode touchpad_get_mode(void) +{ + return current_mode; +} + void button_init_device(void) { /* Nothing to do */ diff --git a/firmware/target/arm/tcc780x/cowond2/button-target.h b/firmware/target/arm/tcc780x/cowond2/button-target.h index 573ab03a11..2890ef65a3 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-target.h +++ b/firmware/target/arm/tcc780x/cowond2/button-target.h @@ -35,11 +35,12 @@ int button_read_device(void); #define BUTTON_MINUS 0x00000004 #define BUTTON_MENU 0x00000008 -/* compatibility hacks - not mapped to the touchpad button areas because - the touchpad is not always in that mode */ -#define BUTTON_LEFT BUTTON_MINUS -#define BUTTON_RIGHT BUTTON_PLUS +/* compatibility hacks These definatly need fixing */ +#define BUTTON_LEFT BUTTON_MIDLEFT +#define BUTTON_RIGHT BUTTON_MIDRIGHT +#define BUTTON_SELECT BUTTON_CENTER +#define BUTTON_UP BUTTON_TOPMIDDLE +#define BUTTON_DOWN BUTTON_BOTTOMMIDDLE /* Faked buttons based on touchscreen quadrants (not yet read) */ /* Touchpad Screen Area Buttons */ |