From fb93c99ce8c7a2a8b50b163af6183b5fbb606623 Mon Sep 17 00:00:00 2001 From: Jean-Louis Biasini Date: Fri, 16 Mar 2012 16:41:07 +0100 Subject: Fuze+: add pdbox plugin 1) Set the compiler to include pdbox 2) Set the keymaps Change-Id: I75cf9b57ac977f7c727a28a3ed6883f65c5bbb20 --- apps/plugins/SUBDIRS | 3 ++- apps/plugins/beatbox/beatbox.c | 15 +++++++++++---- apps/plugins/pdbox/pdbox.h | 9 +++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index c874927205..b1f19d2eac 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -74,7 +74,8 @@ mikmod #if defined(IRIVER_H300_SERIES) || defined(IRIVER_H100_SERIES) || \ (CONFIG_KEYPAD == SANSA_FUZE_PAD) || (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \ - (CONFIG_KEYPAD == IPOD_1G2G_PAD || CONFIG_KEYPAD == SAMSUNG_YPR0_PAD) + (CONFIG_KEYPAD == IPOD_1G2G_PAD || CONFIG_KEYPAD == SAMSUNG_YPR0_PAD) || \ + (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) /* PDBox is confirmed to run on these player models. */ pdbox #endif diff --git a/apps/plugins/beatbox/beatbox.c b/apps/plugins/beatbox/beatbox.c index e7d3225c8b..0fd2a947fb 100644 --- a/apps/plugins/beatbox/beatbox.c +++ b/apps/plugins/beatbox/beatbox.c @@ -106,9 +106,13 @@ #define BTN_UP BUTTON_UP #define BTN_DOWN BUTTON_DOWN -#endif - +#elif CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD +#define BTN_QUIT BUTTON_POWER +#define BTN_RIGHT BUTTON_RIGHT +#define BTN_UP BUTTON_UP +#define BTN_DOWN BUTTON_DOWN +#endif #define FRACTSIZE 10 @@ -216,10 +220,13 @@ int quit=0; #define BEATBOX_RIGHT BUTTON_RIGHT #define BEATBOX_SELECT BUTTON_SELECT - +#if (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) +#define BEATBOX_PLAY BUTTON_PLAYPAUSE +#define BEATBOX_STOP BUTTON_BACK +#else #define BEATBOX_PLAY BUTTON_ON #define BEATBOX_STOP BUTTON_OFF - +#endif #define VAL_NONE 0 #define VAL_ENABLED 1 diff --git a/apps/plugins/pdbox/pdbox.h b/apps/plugins/pdbox/pdbox.h index 7f7c4754e0..711d663da9 100644 --- a/apps/plugins/pdbox/pdbox.h +++ b/apps/plugins/pdbox/pdbox.h @@ -299,6 +299,15 @@ enum pd_key_id #define PDPOD_WHEELLEFT BUTTON_UP #define PDPOD_WHEELRIGHT BUTTON_DOWN #define PDPOD_ACTION BUTTON_SELECT +#elif (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) + #define PDPOD_QUIT BUTTON_POWER + #define PDPOD_PLAY BUTTON_PLAYPAUSE + #define PDPOD_PREVIOUS BUTTON_LEFT + #define PDPOD_NEXT BUTTON_RIGHT + #define PDPOD_MENU BUTTON_BACK + #define PDPOD_WHEELLEFT BUTTON_UP + #define PDPOD_WHEELRIGHT BUTTON_DOWN + #define PDPOD_ACTION BUTTON_SELECT #else #warning "No keys defined for this architecture!" #endif -- cgit v1.2.3