From 89b53bfdaa45057503556871b84621eb14409d59 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 6 Aug 2007 12:58:38 +0000 Subject: e200: Make sure backlight will never get stuck off for long periods from the wheel. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14210 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/sandisk/sansa-e200/button-e200.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firmware/target/arm/sandisk/sansa-e200/button-e200.c b/firmware/target/arm/sandisk/sansa-e200/button-e200.c index 734416bf28..bb90a15096 100644 --- a/firmware/target/arm/sandisk/sansa-e200/button-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/button-e200.c @@ -188,11 +188,12 @@ void clickwheel_int(void) wheel_delta = 1; } - if (TIME_AFTER(usec, next_backlight_on)) + if (TIME_AFTER(current_tick, next_backlight_on) || + v <= 0xffffff/(1000000/4)) { /* poke backlight to turn it on or maintain it no more often than every 1/4 second*/ - next_backlight_on = usec + 1000000/4; + next_backlight_on = current_tick + 1000000/4; backlight_on(); button_backlight_on(); } -- cgit v1.2.3