summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/keymaps/keymap-touchpad.c2
-rw-r--r--apps/plugins/lib/pluginlib_actions.c15
-rw-r--r--firmware/target/arm/tcc780x/cowond2/button-cowond2.c10
-rw-r--r--firmware/target/arm/tcc780x/cowond2/button-target.h11
4 files changed, 29 insertions, 9 deletions
diff --git a/apps/keymaps/keymap-touchpad.c b/apps/keymaps/keymap-touchpad.c
index 48f1103cd3..7b60a80ed1 100644
--- a/apps/keymaps/keymap-touchpad.c
+++ b/apps/keymaps/keymap-touchpad.c
@@ -5,7 +5,7 @@
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
- * $Id: keymap-mr500.c 16056 2008-01-11 21:48:01Z roolku $
+ * $Id$
*
* Copyright (C) 2006 Jonathan Gordon
*
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index 1cd10581e1..7025120bde 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -132,6 +132,8 @@ const struct button_mapping generic_directions[] =
{ PLA_LEFT_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == COWOND2_PAD)
+#warning pluginlib_action needs working keymaps for the d2
+ /* Needs Fxing
{ PLA_UP, BUTTON_UP, BUTTON_NONE},
{ PLA_DOWN, BUTTON_DOWN, BUTTON_NONE},
{ PLA_LEFT, BUTTON_UP, BUTTON_MENU},
@@ -140,6 +142,7 @@ const struct button_mapping generic_directions[] =
{ PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_LEFT_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_MENU},
{ PLA_RIGHT_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_MENU},
+ */
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
{ PLA_UP, BUTTON_RC_VOL_UP, BUTTON_NONE},
{ PLA_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
@@ -230,12 +233,14 @@ const struct button_mapping generic_left_right_fire[] =
{ PLA_FIRE, BUTTON_RC_HEART, BUTTON_NONE},
{ PLA_FIRE_REPEAT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == COWOND2_PAD)
+ /* Needs fixing
{ PLA_LEFT, BUTTON_UP, BUTTON_NONE},
{ PLA_RIGHT, BUTTON_DOWN, BUTTON_NONE},
{ PLA_LEFT_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_FIRE, BUTTON_MENU, BUTTON_NONE},
{ PLA_FIRE_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
+ */
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
{ PLA_LEFT, BUTTON_RC_REW, BUTTON_NONE},
{ PLA_RIGHT, BUTTON_RC_FF, BUTTON_NONE},
@@ -354,8 +359,8 @@ const struct button_mapping generic_actions[] =
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == COWOND2_PAD)
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
- {PLA_START, BUTTON_UP, BUTTON_NONE},
- {PLA_MENU, BUTTON_DOWN, BUTTON_NONE},
+ {PLA_START, BUTTON_MINUS, BUTTON_NONE},
+ {PLA_MENU, BUTTON_PLUS, BUTTON_NONE},
{PLA_FIRE, BUTTON_MENU, BUTTON_NONE},
{PLA_FIRE_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
@@ -380,7 +385,6 @@ const struct button_mapping generic_increase_decrease[] =
|| (CONFIG_KEYPAD == ARCHOS_AV300_PAD) \
|| (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
|| (CONFIG_KEYPAD == ONDIO_PAD) \
- || (CONFIG_KEYPAD == COWOND2_PAD) \
|| (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
|| (CONFIG_KEYPAD == MROBE100_PAD)
{PLA_INC, BUTTON_UP, BUTTON_NONE},
@@ -418,6 +422,11 @@ const struct button_mapping generic_increase_decrease[] =
{PLA_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
{PLA_INC_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
{PLA_DEC_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
+#elif CONFIG_KEYPAD == COWOND2_PAD
+ {PLA_INC, BUTTON_PLUS, BUTTON_NONE},
+ {PLA_DEC, BUTTON_MINUS, BUTTON_NONE},
+ {PLA_INC_REPEAT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE},
+ {PLA_DEC_REPEAT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE},
#else
#error pluginlib_actions: Unsupported keypad
#endif
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 */