From 8d9ff159376c92cd57bb72e75b84218821c8d296 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 19 Sep 2019 15:09:19 -0700 Subject: [PATCH] Switch to using the globally defined KeyAddr, rather than the dummy one defined in the Hardware.h baseclass Signed-off-by: Jesse Vincent --- src/kaleidoscope/hardware/ATMegaKeyboard.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/kaleidoscope/hardware/ATMegaKeyboard.cpp b/src/kaleidoscope/hardware/ATMegaKeyboard.cpp index 34ce075b..d8a6b410 100644 --- a/src/kaleidoscope/hardware/ATMegaKeyboard.cpp +++ b/src/kaleidoscope/hardware/ATMegaKeyboard.cpp @@ -80,7 +80,7 @@ bool ATMegaKeyboard::isKeyswitchPressed(KeyAddr key_addr) { bool ATMegaKeyboard::isKeyswitchPressed(uint8_t 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) { 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) | (bitRead(KeyboardHardware.keyState_[row], col) << 1); if (keyState) { - //handleKeyswitchEvent(Key_NoKey, KeyAddr(row, col), keyState); - handleKeyswitchEvent(Key_NoKey, row, col, keyState); + handleKeyswitchEvent(Key_NoKey, ::KeyAddr(row, col), keyState); } } KeyboardHardware.previousKeyState_[row] = KeyboardHardware.keyState_[row];