aboutsummaryrefslogtreecommitdiff
path: root/keyboards/cassette42
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-05-21 23:17:32 -0700
committerGitHub <noreply@github.com>2021-05-21 23:17:32 -0700
commita0fed0ea176d1c986e40fc4981b900509c90d66e (patch)
treeee12f5943046015ea0dce8e2a30a68bc8eb99dbe /keyboards/cassette42
parent76c23b15abc824f867b48d8d5100dced2417d336 (diff)
downloadqmk_firmware-a0fed0ea176d1c986e40fc4981b900509c90d66e.tar.gz
qmk_firmware-a0fed0ea176d1c986e40fc4981b900509c90d66e.zip
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/cassette42')
-rw-r--r--keyboards/cassette42/keymaps/default/keymap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c
index 2f53c1d6c..4dc46d74e 100644
--- a/keyboards/cassette42/keymaps/default/keymap.c
+++ b/keyboards/cassette42/keymaps/default/keymap.c
@@ -33,10 +33,10 @@ enum layer_number {
33 33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 // LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch) 35 // LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch)
36 [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)), 36 [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)),
37 [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI), 37 [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI),
38 [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI), 38 [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI),
39 [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI), 39 [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI),
40 [_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______), 40 [_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______),
41}; 41};
42 42
@@ -112,7 +112,7 @@ void oled_task_user(void) {
112 112
113void led_set_user(uint8_t usb_led) {} 113void led_set_user(uint8_t usb_led) {}
114 114
115void encoder_update_user(uint8_t index, bool clockwise) { 115bool encoder_update_user(uint8_t index, bool clockwise) {
116 oled_on(); 116 oled_on();
117 if (index == 0) { /* left encoder */ 117 if (index == 0) { /* left encoder */
118 switch (layer_state) { 118 switch (layer_state) {
@@ -171,4 +171,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
171 tap_code(KC_UP); 171 tap_code(KC_UP);
172 } 172 }
173 } 173 }
174 return true;
174} 175}