From 7729d5b28288efb0f84eb63d076288d8dfd9215f Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 21 Feb 2017 20:14:09 +0100 Subject: [PATCH] Drop the layer save/load methods Drop the `load_primary_layer` and `save_primary_layer` methods, because `save_primary_layer` is not used anywhere, and as such, the whole thing is pointless at this time. Furthermore, if we want to allow plugins to implement EEPROM storage, then its best if we leave the default layer save/load to the plugins too. Signed-off-by: Gergely Nagy --- src/Kaleidoscope-Hardware-Model01.cpp | 15 --------------- src/Kaleidoscope-Hardware-Model01.h | 3 --- 2 files changed, 18 deletions(-) diff --git a/src/Kaleidoscope-Hardware-Model01.cpp b/src/Kaleidoscope-Hardware-Model01.cpp index bab20aff..160bb716 100644 --- a/src/Kaleidoscope-Hardware-Model01.cpp +++ b/src/Kaleidoscope-Hardware-Model01.cpp @@ -1,8 +1,5 @@ #include #include -#include - -#define EEPROM_LAYER_LOCATION 0 KeyboardioScanner Model01::leftHand(0); KeyboardioScanner Model01::rightHand(3); @@ -186,16 +183,4 @@ void Model01::reboot_bootloader() { // happens before the watchdog reboots us } -void Model01::save_primary_layer(uint8_t layer) { - EEPROM.write(EEPROM_LAYER_LOCATION, layer); -} - -uint8_t Model01::load_primary_layer(uint8_t layer_count) { - uint8_t layer = EEPROM.read(EEPROM_LAYER_LOCATION); - if (layer >= layer_count) { - return 0; // undefined positions get saved as 255 - } - return 0; // return keymap; -} - HARDWARE_IMPLEMENTATION KeyboardHardware; diff --git a/src/Kaleidoscope-Hardware-Model01.h b/src/Kaleidoscope-Hardware-Model01.h index c92bbf8e..2018fd95 100644 --- a/src/Kaleidoscope-Hardware-Model01.h +++ b/src/Kaleidoscope-Hardware-Model01.h @@ -29,9 +29,6 @@ class Model01 { boolean led_power_fault(void); - uint8_t load_primary_layer(uint8_t layer_count); - void save_primary_layer(uint8_t layer); - keydata_t leftHandState; keydata_t rightHandState; keydata_t previousLeftHandState;