diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2005-11-19 09:26:02 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-11-19 09:26:02 +0000 |
| commit | 93d8ca53c3b6dd0602b31131da0a6f814ec73ca0 (patch) | |
| tree | f38f670eaf54f72e719e0b1bd991b73d57437425 | |
| parent | f9234b3afb59a4db19dd8497987baea9d54d5f1f (diff) | |
| download | rockbox-93d8ca53c3b6dd0602b31131da0a6f814ec73ca0.zip rockbox-93d8ca53c3b6dd0602b31131da0a6f814ec73ca0.tar.gz rockbox-93d8ca53c3b6dd0602b31131da0a6f814ec73ca0.tar.bz2 rockbox-93d8ca53c3b6dd0602b31131da0a6f814ec73ca0.tar.xz | |
Fixed the simulator builds and added HAVE_REMOTE_LCD_TICKING define.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7987 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/settings.c | 4 | ||||
| -rw-r--r-- | apps/settings.h | 2 | ||||
| -rw-r--r-- | apps/settings_menu.c | 4 | ||||
| -rw-r--r-- | firmware/drivers/lcd-h100-remote.c | 8 | ||||
| -rw-r--r-- | firmware/export/config-h100.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-h120.h | 3 |
6 files changed, 23 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index 612c766..0bbdeaa 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -277,7 +277,7 @@ static const struct bit_entry rtc_bits[] = {1, S_O(bidi_support), false, "bidi hebrew/arabic", off_on }, #endif -#ifdef HAVE_REMOTE_LCD /* move to REMOTE_LCD next time we bump version */ +#ifdef HAVE_REMOTE_LCD_TICKING /* move to REMOTE_LCD next time we bump version */ {1, S_O(remote_reduce_ticking), false, "remote reduce ticking", off_on }, #endif @@ -854,7 +854,9 @@ void settings_apply(void) lcd_remote_set_contrast(global_settings.remote_contrast); lcd_remote_set_invert_display(global_settings.remote_invert); lcd_remote_set_flip(global_settings.remote_flip_display); +#ifdef HAVE_REMOTE_LCD_TICKING lcd_remote_emireduce(global_settings.remote_reduce_ticking); +#endif remote_backlight_set_timeout(global_settings.remote_backlight_timeout); #endif backlight_set_timeout(global_settings.backlight_timeout); diff --git a/apps/settings.h b/apps/settings.h index 0dd9789..a4401f8 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -343,9 +343,11 @@ struct user_settings int remote_backlight_timeout; /* backlight off timeout: 0-18 0=never, 1=always, then according to timeout_values[] */ +#ifdef HAVE_REMOTE_LCD_TICKING bool remote_reduce_ticking; /* 0=normal operation, 1=EMI reduce on with cost more CPU. */ #endif +#endif bool next_folder; /* move to next folder */ bool runtimedb; /* runtime database active? */ diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 05fcacf..fc54436 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -121,6 +121,7 @@ static bool remote_flip_display(void) return rc; } +#ifdef HAVE_REMOTE_LCD_TICKING static bool remote_reduce_ticking(void) { bool rc = set_bool( str(LANG_REDUCE_TICKING), @@ -131,6 +132,7 @@ static bool remote_reduce_ticking(void) return rc; } #endif +#endif #ifdef CONFIG_BACKLIGHT static bool caption_backlight(void) @@ -1550,7 +1552,9 @@ static bool lcd_remote_settings_menu(void) { ID2P(LANG_CONTRAST), remote_contrast }, { ID2P(LANG_INVERT), remote_invert }, { ID2P(LANG_FLIP_DISPLAY), remote_flip_display }, +#ifdef HAVE_REMOTE_LCD_TICKING { ID2P(LANG_REDUCE_TICKING), remote_reduce_ticking }, +#endif }; m=menu_init( items, sizeof(items) / sizeof(*items), NULL, diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index 221338b..02a907d 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c @@ -61,11 +61,15 @@ #define RS_HI or_l(0x00010000, &GPIO_OUT) /* delay loop */ +#ifdef HAVE_REMOTE_LCD_TICKING #define DELAY_DEFAULT do { int _x = 0; for (_x = 0;_x < 2;_x++); } while (0) #define DELAY_EMIREDUCE do { int _x = cpu_frequency >> 21; while (_x--); } \ while (0) #define DELAY do { if (emireduce) DELAY_EMIREDUCE; \ else DELAY_DEFAULT; } while (0) +#else +#define DELAY do { int _x = 0; for (_x = 0;_x < 3;_x++); } while (0) +#endif #define SCROLLABLE_LINES 13 @@ -81,8 +85,10 @@ static int curfont = FONT_SYSFIXED; #ifndef SIMULATOR static int xoffset; /* needed for flip */ +#ifdef HAVE_REMOTE_LCD_TICKING /* If set to true, will prevent "ticking" to headphones. */ static bool emireduce = false; +#endif /* remote hotplug */ static int countdown; /* for remote plugging debounce */ @@ -350,10 +356,12 @@ int lcd_remote_default_contrast(void) #ifndef SIMULATOR +#ifdef HAVE_REMOTE_LCD_TICKING void lcd_remote_emireduce(bool state) { emireduce = state; } +#endif void lcd_remote_powersave(bool on) { diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 35b35e0..b9336a7 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h @@ -35,6 +35,9 @@ /* Define this if you have an remote lcd */ #define HAVE_REMOTE_LCD +#ifndef SIMULATOR +#define HAVE_REMOTE_LCD_TICKING +#endif #define CONFIG_LCD LCD_S1D15E06 diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h index e6c829a..dc5e924 100644 --- a/firmware/export/config-h120.h +++ b/firmware/export/config-h120.h @@ -33,6 +33,9 @@ /* Define this if you have an remote lcd */ #define HAVE_REMOTE_LCD +#ifndef SIMULATOR +#define HAVE_REMOTE_LCD_TICKING +#endif #define CONFIG_LCD LCD_S1D15E06 |