Switch to using the globally defined KeyAddr, rather than the dummy one

defined in the Hardware.h baseclass

Signed-off-by: Jesse Vincent <jesse@keyboard.io>
pull/688/head
Jesse Vincent 5 years ago
parent a6ec540bf4
commit 8d9ff15937
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -80,7 +80,7 @@ bool ATMegaKeyboard::isKeyswitchPressed(KeyAddr key_addr) {
bool ATMegaKeyboard::isKeyswitchPressed(uint8_t keyIndex) { bool ATMegaKeyboard::isKeyswitchPressed(uint8_t keyIndex) {
keyIndex--; keyIndex--;
return isKeyswitchPressed(KeyAddr(keyIndex)); return isKeyswitchPressed(::KeyAddr(keyIndex));
} }
@ -100,7 +100,7 @@ bool ATMegaKeyboard::wasKeyswitchPressed(KeyAddr key_addr) {
bool ATMegaKeyboard::wasKeyswitchPressed(uint8_t keyIndex) { bool ATMegaKeyboard::wasKeyswitchPressed(uint8_t keyIndex) {
keyIndex--; keyIndex--;
return wasKeyswitchPressed(KeyAddr(keyIndex)); return wasKeyswitchPressed(::KeyAddr(keyIndex));
} }
@ -110,8 +110,7 @@ void __attribute__((optimize(3))) ATMegaKeyboard::actOnMatrixScan() {
uint8_t keyState = (bitRead(KeyboardHardware.previousKeyState_[row], col) << 0) | uint8_t keyState = (bitRead(KeyboardHardware.previousKeyState_[row], col) << 0) |
(bitRead(KeyboardHardware.keyState_[row], col) << 1); (bitRead(KeyboardHardware.keyState_[row], col) << 1);
if (keyState) { if (keyState) {
//handleKeyswitchEvent(Key_NoKey, KeyAddr(row, col), keyState); handleKeyswitchEvent(Key_NoKey, ::KeyAddr(row, col), keyState);
handleKeyswitchEvent(Key_NoKey, row, col, keyState);
} }
} }
KeyboardHardware.previousKeyState_[row] = KeyboardHardware.keyState_[row]; KeyboardHardware.previousKeyState_[row] = KeyboardHardware.keyState_[row];

Loading…
Cancel
Save