From 72de21ae974fe911e01d98487951c5a2d0a2de65 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 27 Jan 2005 11:49:29 +0000 Subject: button_status() no longer calls button_read(), since it isn't interrupt safe git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5670 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/button.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'firmware') diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index e60657c82d..9376dace7a 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -36,8 +36,8 @@ struct event_queue button_queue; -static int lastbtn; /* Last valid button status */ -static int last_read; /* Last button status, for debouncing/filtering */ +static long lastbtn; /* Last valid button status */ +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 @@ -509,7 +509,7 @@ bool button_hold(void) int button_status(void) { - return button_read(); + return last_btn; } void button_clear_queue(void) -- cgit v1.2.3