diff --git a/src/kaleidoscope/device/keyboardio/Atreus2.cpp b/src/kaleidoscope/device/keyboardio/Atreus2.cpp index b13fe48d..3daa5a8b 100644 --- a/src/kaleidoscope/device/keyboardio/Atreus2.cpp +++ b/src/kaleidoscope/device/keyboardio/Atreus2.cpp @@ -25,18 +25,18 @@ namespace kaleidoscope { namespace device { namespace keyboardio { - const uint8_t kaleidoscope::Device::KeyScannerProps::matrix_rows; - const uint8_t kaleidoscope::Device::KeyScannerProps::matrix_columns; - constexpr uint8_t kaleidoscope::Device::KeyScannerProps::matrix_row_pins[matrix_rows]; - constexpr uint8_t kaleidoscope::Device::KeyScannerProps::matrix_col_pins[matrix_columns]; - template<> uint16_t kaleidoscope::Device::KeyScanner::previousKeyState_[kaleidoscope::Device::KeyScannerProps::matrix_rows] = {}; - template<> uint16_t kaleidoscope::Device::KeyScanner::keyState_[kaleidoscope::Device::KeyScannerProps::matrix_rows] = {}; - template<> uint16_t kaleidoscope::Device::KeyScanner::masks_[kaleidoscope::Device::KeyScannerProps::matrix_rows] = {}; - template<> uint8_t kaleidoscope::Device::KeyScanner::debounce_matrix_[kaleidoscope::Device::KeyScannerProps::matrix_rows][kaleidoscope::Device::KeyScannerProps::matrix_columns] = {}; - - ISR(TIMER1_OVF_vect) { - Runtime.device().keyScanner().do_scan_ = true; - } +const uint8_t kaleidoscope::Device::KeyScannerProps::matrix_rows; +const uint8_t kaleidoscope::Device::KeyScannerProps::matrix_columns; +constexpr uint8_t kaleidoscope::Device::KeyScannerProps::matrix_row_pins[matrix_rows]; +constexpr uint8_t kaleidoscope::Device::KeyScannerProps::matrix_col_pins[matrix_columns]; +template<> uint16_t kaleidoscope::Device::KeyScanner::previousKeyState_[kaleidoscope::Device::KeyScannerProps::matrix_rows] = {}; +template<> uint16_t kaleidoscope::Device::KeyScanner::keyState_[kaleidoscope::Device::KeyScannerProps::matrix_rows] = {}; +template<> uint16_t kaleidoscope::Device::KeyScanner::masks_[kaleidoscope::Device::KeyScannerProps::matrix_rows] = {}; +template<> uint8_t kaleidoscope::Device::KeyScanner::debounce_matrix_[kaleidoscope::Device::KeyScannerProps::matrix_rows][kaleidoscope::Device::KeyScannerProps::matrix_columns] = {}; + +ISR(TIMER1_OVF_vect) { + Runtime.device().keyScanner().do_scan_ = true; +} } } diff --git a/src/kaleidoscope/device/keyboardio/Atreus2.h b/src/kaleidoscope/device/keyboardio/Atreus2.h index 9f662692..5b2659c2 100644 --- a/src/kaleidoscope/device/keyboardio/Atreus2.h +++ b/src/kaleidoscope/device/keyboardio/Atreus2.h @@ -30,32 +30,32 @@ namespace device { namespace keyboardio { - struct AtreusProps : kaleidoscope::device::ATmega32U4KeyboardProps { - struct KeyScannerProps : public kaleidoscope::driver::keyscanner::ATmegaProps { +struct AtreusProps : kaleidoscope::device::ATmega32U4KeyboardProps { + struct KeyScannerProps : public kaleidoscope::driver::keyscanner::ATmegaProps { - static constexpr uint8_t matrix_rows = 4; - static constexpr uint8_t matrix_columns = 12; - typedef MatrixAddr KeyAddr; + static constexpr uint8_t matrix_rows = 4; + static constexpr uint8_t matrix_columns = 12; + typedef MatrixAddr KeyAddr; #ifndef KALEIDOSCOPE_VIRTUAL_BUILD - static constexpr uint8_t matrix_row_pins[matrix_rows] = {PIN_F6, PIN_F5, PIN_F4, PIN_F1}; - static constexpr uint8_t matrix_col_pins[matrix_columns] = {PIN_F7, PIN_E2, PIN_C7, PIN_C6, PIN_B6, PIN_B5, PIN_D7, PIN_D6, PIN_D4, PIN_D5, PIN_D3, PIN_D2}; + static constexpr uint8_t matrix_row_pins[matrix_rows] = {PIN_F6, PIN_F5, PIN_F4, PIN_F1}; + static constexpr uint8_t matrix_col_pins[matrix_columns] = {PIN_F7, PIN_E2, PIN_C7, PIN_C6, PIN_B6, PIN_B5, PIN_D7, PIN_D6, PIN_D4, PIN_D5, PIN_D3, PIN_D2}; #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD - }; - - typedef kaleidoscope::driver::keyscanner::ATmega KeyScanner; - typedef kaleidoscope::driver::bootloader::avr::Caterina BootLoader; - static constexpr const char *short_name = "atreus"; }; + typedef kaleidoscope::driver::keyscanner::ATmega KeyScanner; + typedef kaleidoscope::driver::bootloader::avr::Caterina BootLoader; + static constexpr const char *short_name = "atreus"; +}; + #ifndef KALEIDOSCOPE_VIRTUAL_BUILD - class Atreus: public kaleidoscope::device::ATmega32U4Keyboard {}; +class Atreus: public kaleidoscope::device::ATmega32U4Keyboard {}; #else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD - /* Device definition omitted for virtual device builds. - * We need to forward declare the device name, though, as there are - * some legacy extern references to boards whose definition - * depends on this. - */ - class Atreus; +/* Device definition omitted for virtual device builds. + * We need to forward declare the device name, though, as there are + * some legacy extern references to boards whose definition + * depends on this. + */ +class Atreus; #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD