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:
062c0b0
)
FIX: off by one error, when checking key bits
author
jedin
<jedin>
Fri, 22 Aug 2003 11:25:17 +0000
(11:25 +0000)
committer
jedin
<jedin>
Fri, 22 Aug 2003 11:25:17 +0000
(11:25 +0000)
Corrected comment.
ROM2/keypad.c
patch
|
blob
|
history
diff --git
a/ROM2/keypad.c
b/ROM2/keypad.c
index
980b234
..
0e03095
100644
(file)
--- a/
ROM2/keypad.c
+++ b/
ROM2/keypad.c
@@
-28,13
+28,13
@@
extern inline u8 keypad_read_row(u8 row) {
while(!(_io_ports[M6811_SPDR]&M6811_SPIE)); /* wait for completion */
for (i = _io_ports[M6811_SPDR], num = 0;
- ((i&0x1) == 0) && (num <
7
);
+ ((i&0x1) == 0) && (num <
8
);
i=i>>1, num++);
return num;
}
-/*
returns a key
1..10 or 11 for reset */
+/*
sets last_key to
1..10 or 11 for reset */
void keypad_read() {
/* FIXME: need to do debouncing of some sort? */
u8 key;
UCC
git Repository :: git.ucc.asn.au