diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-03 18:17:11 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-09 12:41:18 -0400 |
commit | aabc8aca47e60cf745a34af28c50679fcb967910 (patch) | |
tree | cfe17f546aae9785fb13482f39527e2da0597ccb /apps/plugins/lib | |
parent | 4231c2c83f2b5331e3e38b10a308ee3752315f9c (diff) | |
download | rockbox-aabc8aca47e60cf745a34af28c50679fcb967910.tar.gz 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.h | 8 | ||||
-rw-r--r-- | apps/plugins/lib/pluginlib_actions.c | 15 |
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 @@ | |||
239 | #define BTN_FIRE BUTTON_PLAY | 239 | #define BTN_FIRE BUTTON_PLAY |
240 | #define BTN_PAUSE BUTTON_POWER | 240 | #define BTN_PAUSE BUTTON_POWER |
241 | 241 | ||
242 | #elif (CONFIG_KEYPAD == FIIO_M3K_PAD) | ||
243 | #define BTN_UP BUTTON_VOL_UP | ||
244 | #define BTN_DOWN BUTTON_VOL_DOWN | ||
245 | #define BTN_LEFT BUTTON_PREV | ||
246 | #define BTN_RIGHT BUTTON_NEXT | ||
247 | #define BTN_FIRE BUTTON_PLAY | ||
248 | #define BTN_PAUSE BUTTON_POWER | ||
249 | |||
242 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) | 250 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) |
243 | #define BTN_UP BUTTON_PREV | 251 | #define BTN_UP BUTTON_PREV |
244 | #define BTN_DOWN BUTTON_NEXT | 252 | #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[] = | |||
233 | { PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE }, | 233 | { PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE }, |
234 | { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 234 | { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, |
235 | { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | 235 | { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, |
236 | #elif (CONFIG_KEYPAD == FIIO_M3K_PAD) | ||
237 | { PLA_UP, BUTTON_HOME, BUTTON_NONE }, | ||
238 | { PLA_DOWN, BUTTON_OPTION, BUTTON_NONE }, | ||
239 | { PLA_LEFT, BUTTON_PREV, BUTTON_NONE }, | ||
240 | { PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE }, | ||
241 | { PLA_UP_REPEAT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE }, | ||
242 | { PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE }, | ||
243 | { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | ||
244 | { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | ||
236 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) | 245 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) |
237 | { PLA_UP, BUTTON_PREV, BUTTON_NONE }, | 246 | { PLA_UP, BUTTON_PREV, BUTTON_NONE }, |
238 | { PLA_DOWN, BUTTON_NEXT, BUTTON_NONE }, | 247 | { PLA_DOWN, BUTTON_NEXT, BUTTON_NONE }, |
@@ -464,6 +473,12 @@ const struct button_mapping pla_main_ctx[] = | |||
464 | {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE}, | 473 | {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE}, |
465 | {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY}, | 474 | {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY}, |
466 | {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE}, | 475 | {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE}, |
476 | #elif (CONFIG_KEYPAD == FIIO_M3K_PAD) | ||
477 | {PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER}, | ||
478 | {PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE}, | ||
479 | {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE}, | ||
480 | {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY}, | ||
481 | {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE}, | ||
467 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) | 482 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) |
468 | {PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER}, | 483 | {PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER}, |
469 | {PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE}, | 484 | {PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE}, |