diff options
author | Joel Challis <git@zvecr.com> | 2021-11-01 22:45:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 09:45:30 +1100 |
commit | 7ae0f371cf55a589a4735098f52e722f579de41d (patch) | |
tree | 747be483f3019d0603f0bf7c214245379031c3a1 /keyboards/massdrop/alt | |
parent | f4ea262c17ecd53b18180a19c33a9ba5da70ec9d (diff) |
Add support to persist MD LED framework settings (#14980)
* Add support to persist MD LED framework settings
* avoid out-of-bounds errors when SmartEEPROM is not enabled
* Update brightness defaults
* clang
Diffstat (limited to 'keyboards/massdrop/alt')
-rw-r--r-- | keyboards/massdrop/alt/config.h | 3 | ||||
-rw-r--r-- | keyboards/massdrop/alt/keymaps/default_md/keymap.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index c37949a74b..1a0a7c9768 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -43,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 5bd543ed63..fa8b294cd1 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -62,6 +62,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint8_t scroll_effect = 0; switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } + + switch (keycode) { case L_BRI: if (record->event.pressed) { if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; |