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
This commit is contained in:
Miika Pekkarinen 2005-11-19 09:26:02 +00:00
parent f9234b3afb
commit 93d8ca53c3
6 changed files with 23 additions and 1 deletions

View file

@ -277,7 +277,7 @@ static const struct bit_entry rtc_bits[] =
{1, S_O(bidi_support), false, "bidi hebrew/arabic", off_on }, {1, S_O(bidi_support), false, "bidi hebrew/arabic", off_on },
#endif #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 }, {1, S_O(remote_reduce_ticking), false, "remote reduce ticking", off_on },
#endif #endif
@ -854,7 +854,9 @@ void settings_apply(void)
lcd_remote_set_contrast(global_settings.remote_contrast); lcd_remote_set_contrast(global_settings.remote_contrast);
lcd_remote_set_invert_display(global_settings.remote_invert); lcd_remote_set_invert_display(global_settings.remote_invert);
lcd_remote_set_flip(global_settings.remote_flip_display); lcd_remote_set_flip(global_settings.remote_flip_display);
#ifdef HAVE_REMOTE_LCD_TICKING
lcd_remote_emireduce(global_settings.remote_reduce_ticking); lcd_remote_emireduce(global_settings.remote_reduce_ticking);
#endif
remote_backlight_set_timeout(global_settings.remote_backlight_timeout); remote_backlight_set_timeout(global_settings.remote_backlight_timeout);
#endif #endif
backlight_set_timeout(global_settings.backlight_timeout); backlight_set_timeout(global_settings.backlight_timeout);

View file

@ -343,8 +343,10 @@ struct user_settings
int remote_backlight_timeout; /* backlight off timeout: 0-18 0=never, int remote_backlight_timeout; /* backlight off timeout: 0-18 0=never,
1=always, 1=always,
then according to timeout_values[] */ then according to timeout_values[] */
#ifdef HAVE_REMOTE_LCD_TICKING
bool remote_reduce_ticking; /* 0=normal operation, bool remote_reduce_ticking; /* 0=normal operation,
1=EMI reduce on with cost more CPU. */ 1=EMI reduce on with cost more CPU. */
#endif
#endif #endif
bool next_folder; /* move to next folder */ bool next_folder; /* move to next folder */

View file

@ -121,6 +121,7 @@ static bool remote_flip_display(void)
return rc; return rc;
} }
#ifdef HAVE_REMOTE_LCD_TICKING
static bool remote_reduce_ticking(void) static bool remote_reduce_ticking(void)
{ {
bool rc = set_bool( str(LANG_REDUCE_TICKING), bool rc = set_bool( str(LANG_REDUCE_TICKING),
@ -131,6 +132,7 @@ static bool remote_reduce_ticking(void)
return rc; return rc;
} }
#endif #endif
#endif
#ifdef CONFIG_BACKLIGHT #ifdef CONFIG_BACKLIGHT
static bool caption_backlight(void) static bool caption_backlight(void)
@ -1550,7 +1552,9 @@ static bool lcd_remote_settings_menu(void)
{ ID2P(LANG_CONTRAST), remote_contrast }, { ID2P(LANG_CONTRAST), remote_contrast },
{ ID2P(LANG_INVERT), remote_invert }, { ID2P(LANG_INVERT), remote_invert },
{ ID2P(LANG_FLIP_DISPLAY), remote_flip_display }, { ID2P(LANG_FLIP_DISPLAY), remote_flip_display },
#ifdef HAVE_REMOTE_LCD_TICKING
{ ID2P(LANG_REDUCE_TICKING), remote_reduce_ticking }, { ID2P(LANG_REDUCE_TICKING), remote_reduce_ticking },
#endif
}; };
m=menu_init( items, sizeof(items) / sizeof(*items), NULL, m=menu_init( items, sizeof(items) / sizeof(*items), NULL,

View file

@ -61,11 +61,15 @@
#define RS_HI or_l(0x00010000, &GPIO_OUT) #define RS_HI or_l(0x00010000, &GPIO_OUT)
/* delay loop */ /* delay loop */
#ifdef HAVE_REMOTE_LCD_TICKING
#define DELAY_DEFAULT do { int _x = 0; for (_x = 0;_x < 2;_x++); } while (0) #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--); } \ #define DELAY_EMIREDUCE do { int _x = cpu_frequency >> 21; while (_x--); } \
while (0) while (0)
#define DELAY do { if (emireduce) DELAY_EMIREDUCE; \ #define DELAY do { if (emireduce) DELAY_EMIREDUCE; \
else DELAY_DEFAULT; } while (0) 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 #define SCROLLABLE_LINES 13
@ -81,8 +85,10 @@ static int curfont = FONT_SYSFIXED;
#ifndef SIMULATOR #ifndef SIMULATOR
static int xoffset; /* needed for flip */ static int xoffset; /* needed for flip */
#ifdef HAVE_REMOTE_LCD_TICKING
/* If set to true, will prevent "ticking" to headphones. */ /* If set to true, will prevent "ticking" to headphones. */
static bool emireduce = false; static bool emireduce = false;
#endif
/* remote hotplug */ /* remote hotplug */
static int countdown; /* for remote plugging debounce */ static int countdown; /* for remote plugging debounce */
@ -350,10 +356,12 @@ int lcd_remote_default_contrast(void)
#ifndef SIMULATOR #ifndef SIMULATOR
#ifdef HAVE_REMOTE_LCD_TICKING
void lcd_remote_emireduce(bool state) void lcd_remote_emireduce(bool state)
{ {
emireduce = state; emireduce = state;
} }
#endif
void lcd_remote_powersave(bool on) void lcd_remote_powersave(bool on)
{ {

View file

@ -35,6 +35,9 @@
/* Define this if you have an remote lcd */ /* Define this if you have an remote lcd */
#define HAVE_REMOTE_LCD #define HAVE_REMOTE_LCD
#ifndef SIMULATOR
#define HAVE_REMOTE_LCD_TICKING
#endif
#define CONFIG_LCD LCD_S1D15E06 #define CONFIG_LCD LCD_S1D15E06

View file

@ -33,6 +33,9 @@
/* Define this if you have an remote lcd */ /* Define this if you have an remote lcd */
#define HAVE_REMOTE_LCD #define HAVE_REMOTE_LCD
#ifndef SIMULATOR
#define HAVE_REMOTE_LCD_TICKING
#endif
#define CONFIG_LCD LCD_S1D15E06 #define CONFIG_LCD LCD_S1D15E06