diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-01-27 11:49:29 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-01-27 11:49:29 +0000 |
commit | 72de21ae974fe911e01d98487951c5a2d0a2de65 (patch) | |
tree | 9eb8eb380a03849b5da9633048f03d210cb1abc2 /firmware/drivers | |
parent | f4702040d64e86d717a6af80cd4e910f15407a51 (diff) | |
download | rockbox-72de21ae974fe911e01d98487951c5a2d0a2de65.tar.gz rockbox-72de21ae974fe911e01d98487951c5a2d0a2de65.zip |
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
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/button.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
36 | 36 | ||
37 | struct event_queue button_queue; | 37 | struct event_queue button_queue; |
38 | 38 | ||
39 | static int lastbtn; /* Last valid button status */ | 39 | static long lastbtn; /* Last valid button status */ |
40 | static int last_read; /* Last button status, for debouncing/filtering */ | 40 | static long last_read; /* Last button status, for debouncing/filtering */ |
41 | #ifdef HAVE_LCD_BITMAP | 41 | #ifdef HAVE_LCD_BITMAP |
42 | static bool flipped; /* buttons can be flipped to match the LCD flip */ | 42 | static bool flipped; /* buttons can be flipped to match the LCD flip */ |
43 | #endif | 43 | #endif |
@@ -509,7 +509,7 @@ bool button_hold(void) | |||
509 | 509 | ||
510 | int button_status(void) | 510 | int button_status(void) |
511 | { | 511 | { |
512 | return button_read(); | 512 | return last_btn; |
513 | } | 513 | } |
514 | 514 | ||
515 | void button_clear_queue(void) | 515 | void button_clear_queue(void) |