From 499f0fca3a0243cb8c19193aa8951b9f218bd9af Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 26 Jun 2020 19:56:54 -0700 Subject: [PATCH] Atreus2: remove use of ATMEGA_KEYSCANNER_PROPS --- src/kaleidoscope/device/keyboardio/Atreus2.h | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/kaleidoscope/device/keyboardio/Atreus2.h b/src/kaleidoscope/device/keyboardio/Atreus2.h index c62d966e..9f662692 100644 --- a/src/kaleidoscope/device/keyboardio/Atreus2.h +++ b/src/kaleidoscope/device/keyboardio/Atreus2.h @@ -32,18 +32,23 @@ namespace keyboardio { struct AtreusProps : kaleidoscope::device::ATmega32U4KeyboardProps { struct KeyScannerProps : public kaleidoscope::driver::keyscanner::ATmegaProps { - ATMEGA_KEYSCANNER_PROPS( - ROW_PIN_LIST({PIN_F6, PIN_F5, PIN_F4, PIN_F1}), - COL_PIN_LIST({PIN_F7, PIN_E2, PIN_C7, PIN_C6, PIN_B6, PIN_B5, PIN_D7, PIN_D6, PIN_D4, PIN_D5, PIN_D3, PIN_D2})); - }; - typedef kaleidoscope::driver::keyscanner::ATmega KeyScanner; - typedef kaleidoscope::driver::bootloader::avr::Caterina BootLoader; - static constexpr const char *short_name = "atreus"; + + 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}; +#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"; }; #ifndef KALEIDOSCOPE_VIRTUAL_BUILD 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