git.ucc.asn.au
/
uccvend-snackrom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b1cde6
)
FIX: incorrect test for "no key pressed".
author
jedin
<jedin>
Sat, 16 Aug 2003 07:53:52 +0000
(07:53 +0000)
committer
jedin
<jedin>
Sat, 16 Aug 2003 07:53:52 +0000
(07:53 +0000)
ROM2/keypad.c
patch
|
blob
|
history
diff --git
a/ROM2/keypad.c
b/ROM2/keypad.c
index
4105b24
..
23eddb8
100644
(file)
--- a/
ROM2/keypad.c
+++ b/
ROM2/keypad.c
@@
-10,6
+10,8
@@
bool new_key = 0;
const u8 keymap0[8] = {KEY_8, KEY_7, KEY_6, KEY_5, KEY_4, KEY_3, KEY_2, KEY_1};
const u8 keymap1[3] = {KEY_RESET, KEY_0, KEY_9};
+#define NO_KEY 8
+
extern inline u8 keypad_read_row(u8 row) {
u8 i, num;
if (row)
@@
-34,7
+36,7
@@
void keypad_read() {
/* FIXME: need to do debouncing of some sort? */
u8 key;
key = keypad_read_row(0);
- if (
!
key) {
+ if (
NO_KEY ==
key) {
key = keypad_read_row(1);
key = keymap1[key];
} else
UCC
git Repository :: git.ucc.asn.au