1
0
Fork 0
forked from len0rd/rockbox

Moved archos backlight code to target tree. Changed old mutlivalue CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2007-04-12 22:12:13 +00:00
parent 734278b7d1
commit 47bf6c5a5a
53 changed files with 256 additions and 152 deletions

View file

@ -52,12 +52,12 @@ static long last_read; /* Last button status, for debouncing/filtering */
#ifdef HAVE_LCD_BITMAP
static bool flipped; /* buttons can be flipped to match the LCD flip */
#endif
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
static bool filter_first_keypress;
#ifdef HAVE_REMOTE_LCD
static bool remote_filter_first_keypress;
#endif
#endif /* CONFIG_BACKLIGHT */
#endif /* HAVE_BACKLIGHT */
#ifdef HAVE_HEADPHONE_DETECTION
bool phones_present = false;
#endif
@ -80,7 +80,7 @@ static void button_tick(void)
static int repeat_count = 0;
static bool repeat = false;
static bool post = false;
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
static bool skip_release = false;
#ifdef HAVE_REMOTE_LCD
static bool skip_remote_release = false;
@ -121,7 +121,7 @@ static void button_tick(void)
diff = btn ^ lastbtn;
if(diff && (btn & diff) == 0)
{
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
#ifdef HAVE_REMOTE_LCD
if(diff & BUTTON_REMOTE)
if(!skip_remote_release)
@ -211,7 +211,7 @@ static void button_tick(void)
if (queue_empty(&button_queue))
{
queue_post(&button_queue, BUTTON_REPEAT | btn, 0);
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
#ifdef HAVE_REMOTE_LCD
skip_remote_release = false;
#endif
@ -222,7 +222,7 @@ static void button_tick(void)
}
else
{
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
#ifdef HAVE_REMOTE_LCD
if (btn & BUTTON_REMOTE) {
if (!remote_filter_first_keypress || is_remote_backlight_on()
@ -347,7 +347,7 @@ void button_init(void)
#ifdef HAVE_LCD_BITMAP
flipped = false;
#endif
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
filter_first_keypress = false;
#ifdef HAVE_REMOTE_LCD
remote_filter_first_keypress = false;
@ -419,7 +419,7 @@ void button_set_flip(bool flip)
}
#endif /* HAVE_LCD_BITMAP */
#if CONFIG_BACKLIGHT
#ifdef HAVE_BACKLIGHT
void set_backlight_filter_keypress(bool value)
{
filter_first_keypress = value;