diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-18 05:07:19 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-18 05:07:19 +0000 |
commit | bd47d48c21ddcdd56b3654db78613d93739b8ce7 (patch) | |
tree | 78ddd13c384995b4220adc2c85eff233956420d2 /apps | |
parent | ac61951452e001da48430d8487521ad32b7a123c (diff) | |
download | rockbox-bd47d48c21ddcdd56b3654db78613d93739b8ce7.tar.gz rockbox-bd47d48c21ddcdd56b3654db78613d93739b8ce7.zip |
Do the CONFIG_LED define
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 2 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 8 | ||||
-rw-r--r-- | apps/gui/statusbar.h | 2 | ||||
-rw-r--r-- | apps/main.c | 4 | ||||
-rw-r--r-- | apps/recorder/icons.h | 2 | ||||
-rw-r--r-- | apps/recorder/recording.c | 14 | ||||
-rw-r--r-- | apps/screen_access.c | 2 | ||||
-rw-r--r-- | apps/screen_access.h | 2 |
8 files changed, 18 insertions, 18 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 4404776c7f..d533e33f9c 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -845,7 +845,7 @@ static char* get_tag(struct wps_data* wps_data, } break; -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) case 'l': /* VIRTUAL_LED */ { switch(tag[1]) diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 805b6a0ade..f1bd58d70f 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -116,7 +116,7 @@ 7*ICONS_SPACING #define STATUSBAR_LOCKR_WIDTH 5 -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) #define STATUSBAR_DISK_WIDTH 12 #define STATUSBAR_DISK_X_POS(statusbar_width) statusbar_width - \ STATUSBAR_DISK_WIDTH @@ -208,7 +208,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) bar->info.repeat = global_settings.repeat_mode; bar->info.playmode = current_playmode(); -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) if(!display->has_disk_led) bar->info.led = led_read(HZ/2); /* delay should match polling interval */ #endif @@ -300,7 +300,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) #ifdef CONFIG_RTC gui_statusbar_time(display, bar->info.hour, bar->info.minute); #endif /* CONFIG_RTC */ -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) if(!display->has_disk_led && bar->info.led) gui_statusbar_led(display); #endif @@ -541,7 +541,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display) } #endif -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) /* * no real LED: disk activity in status bar */ diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index 5190adc889..516598dd00 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h @@ -52,7 +52,7 @@ struct status_info { #ifdef HAS_REMOTE_BUTTON_HOLD bool keylockremote; #endif -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) bool led; /* disk LED simulation in the status bar */ #endif diff --git a/apps/main.c b/apps/main.c index 9a55be8eda..22eda84f03 100644 --- a/apps/main.c +++ b/apps/main.c @@ -7,7 +7,7 @@ * \/ \/ \/ \/ \/ * $Id$ * - * Copyright (C) 2002 by Björn Stenberg + * Copyright (C) 2002 by Bj�n Stenberg * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. @@ -561,7 +561,7 @@ int main(void) app_main(); while(1) { -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) +#if (CONFIG_LED == LED_REAL) led(true); sleep(HZ/10); led(false); sleep(HZ/10); #endif diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index 729e0328dc..bef1fa617b 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h @@ -173,7 +173,7 @@ extern void statusbar_icon_lock(void); #ifdef CONFIG_RTC extern void statusbar_time(int hour, int minute); #endif -#if defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL) +#if (CONFIG_LED == LED_VIRTUAL) extern void statusbar_led(void); #endif diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index d81b3690c8..8eea24d82d 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -773,7 +773,7 @@ bool recording_screen(bool no_source) FMRADIO_OFF : get_radio_status(); #endif int talk_menu = global_settings.talk_menu; -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) +#if (CONFIG_LED == LED_REAL) bool led_state = false; int led_countdown = 2; #endif @@ -803,7 +803,7 @@ bool recording_screen(bool no_source) in_screen = true; cursor = 0; -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) +#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) ata_set_led_enabled(false); #endif @@ -876,7 +876,7 @@ bool recording_screen(bool no_source) { audio_stat = audio_status(); -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) +#if (CONFIG_LED == LED_REAL) /* * Flash the LED while waiting to record. Turn it on while @@ -1188,7 +1188,7 @@ bool recording_screen(bool no_source) const int prev_rec_source = global_settings.rec_source; #endif -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) +#if (CONFIG_LED == LED_REAL) /* led is restored at begin of loop / end of function */ led(false); #endif @@ -1251,7 +1251,7 @@ bool recording_screen(bool no_source) case ACTION_REC_F2: if(audio_stat != AUDIO_STATUS_RECORD) { -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) +#if (CONFIG_LED == LED_REAL) /* led is restored at begin of loop / end of function */ led(false); #endif @@ -1275,7 +1275,7 @@ bool recording_screen(bool no_source) { if(audio_stat != AUDIO_STATUS_RECORD) { -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) +#if (CONFIG_LED == LED_REAL) /* led is restored at begin of loop / end of function */ led(false); #endif @@ -1780,7 +1780,7 @@ bool recording_screen(bool no_source) if (have_recorded) reload_directory(); -#if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) +#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) ata_set_led_enabled(true); #endif return been_in_usb_mode; diff --git a/apps/screen_access.c b/apps/screen_access.c index f2e38e95e1..00db92769b 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c @@ -111,7 +111,7 @@ void screen_init(struct screen * screen, enum screen_type screen_type) case SCREEN_MAIN: default: screen->depth=LCD_DEPTH; -#if defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL) +#if (CONFIG_LED == LED_VIRTUAL) screen->has_disk_led=false; #elif defined(HAVE_REMOTE_LCD) screen->has_disk_led=true; diff --git a/apps/screen_access.h b/apps/screen_access.h index befd7a6d3a..54f2d64fdb 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -54,7 +54,7 @@ struct screen int depth; int char_width; int char_height; -#if (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) || defined(HAVE_REMOTE_LCD) +#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) bool has_disk_led; #endif #ifdef HAS_BUTTONBAR |