summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lib
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-03 18:17:11 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-09 12:41:18 -0400
commitaabc8aca47e60cf745a34af28c50679fcb967910 (patch)
treecfe17f546aae9785fb13482f39527e2da0597ccb /apps/plugins/lib
parent4231c2c83f2b5331e3e38b10a308ee3752315f9c (diff)
downloadrockbox-aabc8aca47e60cf745a34af28c50679fcb967910.tar.gz
rockbox-aabc8aca47e60cf745a34af28c50679fcb967910.tar.bz2
rockbox-aabc8aca47e60cf745a34af28c50679fcb967910.zip
New port: FiiO M3K
Most credit goes to: Roman Skylarov Additional integration and refactoring by myself. *** COMPLETELY UNTESTED *** Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/keymaps.h8
-rw-r--r--apps/plugins/lib/pluginlib_actions.c15
2 files changed, 23 insertions, 0 deletions
diff --git a/apps/plugins/lib/keymaps.h b/apps/plugins/lib/keymaps.h
index e3de03f222..2865f9cdd7 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -239,6 +239,14 @@
#define BTN_FIRE BUTTON_PLAY
#define BTN_PAUSE BUTTON_POWER
+#elif (CONFIG_KEYPAD == FIIO_M3K_PAD)
+#define BTN_UP BUTTON_VOL_UP
+#define BTN_DOWN BUTTON_VOL_DOWN
+#define BTN_LEFT BUTTON_PREV
+#define BTN_RIGHT BUTTON_NEXT
+#define BTN_FIRE BUTTON_PLAY
+#define BTN_PAUSE BUTTON_POWER
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define BTN_UP BUTTON_PREV
#define BTN_DOWN BUTTON_NEXT
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index c580074d5e..480dc446cb 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -233,6 +233,15 @@ const struct button_mapping pla_main_ctx[] =
{ PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+#elif (CONFIG_KEYPAD == FIIO_M3K_PAD)
+ { PLA_UP, BUTTON_HOME, BUTTON_NONE },
+ { PLA_DOWN, BUTTON_OPTION, BUTTON_NONE },
+ { PLA_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { PLA_UP_REPEAT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
{ PLA_UP, BUTTON_PREV, BUTTON_NONE },
{ PLA_DOWN, BUTTON_NEXT, BUTTON_NONE },
@@ -464,6 +473,12 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == FIIO_M3K_PAD)
+ {PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
+ {PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
+ {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
+ {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
+ {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},