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;