summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-06-22 07:16:31 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-06-22 07:16:31 +0000
commite61f6fa5995780054760b44b35ef4f4d4a35afed (patch)
tree15c6088c7ec50acbcd807cbff555399108281ad1 /firmware/drivers/button.c
parent0907631464198e30235e1c628ba630bb73c498d2 (diff)
downloadrockbox-e61f6fa5995780054760b44b35ef4f4d4a35afed.zip
rockbox-e61f6fa5995780054760b44b35ef4f4d4a35afed.tar.gz
rockbox-e61f6fa5995780054760b44b35ef4f4d4a35afed.tar.bz2
rockbox-e61f6fa5995780054760b44b35ef4f4d4a35afed.tar.xz
Added reset_poweroff_timer(), which can be used to prevent idle poweroff. This is also available in the plugin API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4787 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index f3b9021..9f19bc0 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -31,10 +31,10 @@
#include "serial.h"
#include "power.h"
#include "system.h"
+#include "powermgmt.h"
struct event_queue button_queue;
-long last_keypress;
static int lastbtn;
#ifdef HAVE_RECORDER_KEYPAD
static bool flipped; /* bottons can be flipped to match the LCD flip */
@@ -141,7 +141,7 @@ static void button_tick(void)
queue_post(&button_queue, btn, NULL);
backlight_on();
- last_keypress = current_tick;
+ reset_poweroff_timer();
}
}
else
@@ -216,7 +216,7 @@ void button_init()
queue_init(&button_queue);
lastbtn = 0;
tick_add_task(button_tick);
- last_keypress = current_tick;
+ reset_poweroff_timer();
flipped = false;
}
@@ -359,7 +359,7 @@ void button_init(void)
lastbtn = 0;
tick_add_task(button_tick);
- last_keypress = current_tick;
+ reset_poweroff_timer();
}
static int button_read(void)
@@ -396,7 +396,7 @@ void button_init(void)
lastbtn = 0;
tick_add_task(button_tick);
- last_keypress = current_tick;
+ reset_poweroff_timer();
}
int button_read(void)
{