diff options
author | Drashna Jaelre <drashna@live.com> | 2021-05-21 23:17:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 23:17:32 -0700 |
commit | a0fed0ea176d1c986e40fc4981b900509c90d66e (patch) | |
tree | ee12f5943046015ea0dce8e2a30a68bc8eb99dbe /keyboards/dmqdesign/spin/keymaps/via | |
parent | 76c23b15abc824f867b48d8d5100dced2417d336 (diff) |
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/dmqdesign/spin/keymaps/via')
-rw-r--r-- | keyboards/dmqdesign/spin/keymaps/via/keymap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/keyboards/dmqdesign/spin/keymaps/via/keymap.c b/keyboards/dmqdesign/spin/keymaps/via/keymap.c index c3b5ef2603..6527cc8fd8 100644 --- a/keyboards/dmqdesign/spin/keymaps/via/keymap.c +++ b/keyboards/dmqdesign/spin/keymaps/via/keymap.c @@ -45,24 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* First encoder */ if (clockwise) { rgblight_increase_hue(); //Cycle through the RGB hue } else { rgblight_decrease_hue(); } - } else if (index == 1) { /* Second encoder */ + } else if (index == 1) { /* Second encoder */ if (clockwise) { rgblight_increase_sat(); } else { rgblight_decrease_sat(); } - } else if (index == 2) { /* Third encoder */ + } else if (index == 2) { /* Third encoder */ if (clockwise) { rgblight_increase_val(); //Change brightness on the RGB LEDs } else { rgblight_decrease_val(); } } -}
\ No newline at end of file + return true; +} |