diff --git a/KeyboardioFirmware.ino b/KeyboardioFirmware.ino index 87df894b..370b3a1d 100644 --- a/KeyboardioFirmware.ino +++ b/KeyboardioFirmware.ino @@ -18,8 +18,7 @@ void setup() { Keyboard.begin(); Mouse.begin(); AbsoluteMouse.begin(); - KeyboardHardware.leds_setup(); - KeyboardHardware.pins_setup(); + KeyboardHardware.setup(); LEDControl.boot_animation(); temporary_keymap = primary_keymap = Storage.load_primary_keymap(KEYMAPS); diff --git a/implementation/Model01Beta.cpp b/implementation/Model01Beta.cpp index bf6b1df5..94d295cc 100644 --- a/implementation/Model01Beta.cpp +++ b/implementation/Model01Beta.cpp @@ -13,6 +13,10 @@ Model01Beta_::Model01Beta_(void) { } +void Model01Beta_::setup(void) { + pins_setup(); + leds_setup(); +} void Model01Beta_::leds_setup() { LED.setOutput(LED_DATA_PIN); LED.setColorOrderGRB(); // Uncomment for RGB color order diff --git a/implementation/Model01Beta.h b/implementation/Model01Beta.h index c57053c1..b062477c 100644 --- a/implementation/Model01Beta.h +++ b/implementation/Model01Beta.h @@ -38,9 +38,7 @@ class Model01Beta_ { cRGB get_key_color(byte row, byte col); void scan_matrix(void); - - void pins_setup(); - void leds_setup(); + void setup(); private: @@ -51,6 +49,8 @@ class Model01Beta_ { int left_initted = 0; boolean right_hand_connected(void); + void pins_setup(); + void leds_setup(); void scan_row(byte row); void finish_scanning_row(byte row); void scan_right_col(byte row, byte col, uint8_t *state);