From 0e6dd7efcd21d48665b5a799fe081a75cdcb960f Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 27 Nov 2006 02:16:32 +0000 Subject: Moved archos button reading to target tree. * Cleanup of button.[ch]. * Deactivated serial remote code for recorder FM/V2 as there is no remote pin, saving ~500 bytes of code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11612 a1c6a512-1295-4272-9138-f99709370657 --- apps/keymaps/keymap-recorder.c | 4 ++++ apps/main.c | 3 +-- apps/plugins/battery_bench.c | 8 +++++--- apps/plugins/wormlet.c | 6 ++++-- 4 files changed, 14 insertions(+), 7 deletions(-) (limited to 'apps') diff --git a/apps/keymaps/keymap-recorder.c b/apps/keymaps/keymap-recorder.c index cc09b90bfd..c51bde9a4b 100644 --- a/apps/keymaps/keymap-recorder.c +++ b/apps/keymaps/keymap-recorder.c @@ -215,6 +215,7 @@ const struct button_mapping button_context_radio[] = { }; +#if BUTTON_REMOTE != 0 /***************************************************************************** * Remote control mappings *****************************************************************************/ @@ -254,11 +255,14 @@ static const struct button_mapping* get_context_mapping_remote( int context ) return remote_button_context_standard; } } +#endif /* BUTTON_REMOTE != 0 */ const struct button_mapping* get_context_mapping( int context ) { +#if BUTTON_REMOTE != 0 if (context&CONTEXT_REMOTE) return get_context_mapping_remote(context); +#endif switch( context ) { diff --git a/apps/main.c b/apps/main.c index abe73414c1..7a100eb5a8 100644 --- a/apps/main.c +++ b/apps/main.c @@ -309,8 +309,7 @@ void init(void) #ifdef DEBUG debug_init(); #else -#ifndef HAVE_MMC /* FIXME: This is also necessary for debug builds - * (do debug builds on the Ondio make sense?) */ +#if !defined(HAVE_FMADC) && !defined(HAVE_MMC) serial_setup(); #endif #endif diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index c9c289acb7..9b8871eb41 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -29,15 +29,17 @@ PLUGIN_HEADER #define EV_EXIT 1337 /* seems to work with 1300, but who knows... */ -#define THREAD_STACK_SIZE DEFAULT_STACK_SIZE + 0x200 +#define THREAD_STACK_SIZE DEFAULT_STACK_SIZE + 0x200 #if CONFIG_KEYPAD == RECORDER_PAD #define BATTERY_ON BUTTON_PLAY -#define BATTERY_RC_ON BUTTON_RC_PLAY - #define BATTERY_OFF BUTTON_OFF + +#if BUTTON_REMOTE != 0 +#define BATTERY_RC_ON BUTTON_RC_PLAY #define BATTERY_RC_OFF BUTTON_RC_STOP +#endif #elif CONFIG_KEYPAD == ONDIO_PAD diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 1ca570d24a..6a10fac984 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -47,15 +47,17 @@ PLUGIN_HEADER #define BTN_DIR_RIGHT BUTTON_RIGHT #define BTN_PLAYER2_DIR1 BUTTON_F2 #define BTN_PLAYER2_DIR2 BUTTON_F3 -#define BTN_RC_UP BUTTON_RC_VOL_UP -#define BTN_RC_DOWN BUTTON_RC_VOL_DOWN #define BTN_STARTPAUSE BUTTON_PLAY #define BTN_QUIT BUTTON_OFF #define BTN_STOPRESET BUTTON_ON #define BTN_TOGGLE_KEYS BUTTON_F1 +#if BUTTON_REMOTE != 0 +#define BTN_RC_UP BUTTON_RC_VOL_UP +#define BTN_RC_DOWN BUTTON_RC_VOL_DOWN #define REMOTE #define MULTIPLAYER +#endif #define PLAYERS_TEXT "UP/DN" #define WORMS_TEXT "L/R" -- cgit v1.2.3