From a0fed0ea176d1c986e40fc4981b900509c90d66e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 21 May 2021 23:17:32 -0700 Subject: Convert Encoder callbacks to be boolean functions (#12805) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c') diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c index 327cc7720d..d1ddd3bcb4 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c @@ -47,12 +47,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void encoder_update_kb(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } + return true; } #ifdef OLED_DRIVER_ENABLE -- cgit v1.2.3 From 4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:28:26 +1000 Subject: [Core] Refactor OLED to allow easy addition of other types (#13454) * add docs * core changes * update keyboards to new OLED * updated users to new OLED * update layouts to new OLED * fixup docs * drashna's suggestion * fix up docs * new keyboards with oled * core split changes * remaining keyboard files * Fix The Helix keyboards oled options * reflect develop Co-authored-by: Drashna Jaelre Co-authored-by: mtei <2170248+mtei@users.noreply.github.com> --- keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c') diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c index d9365f54bf..5c4e31ab6b 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c @@ -86,7 +86,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define IDLE_FRAME_DURATION 200 // Idle animation iteration rate in ms oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } @@ -173,7 +173,7 @@ void oled_task_user(void) { // Animate tap bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE // Check if non-mod if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) { if (record->event.pressed) { @@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case PROG: if (record->event.pressed) { rgblight_disable_noeeprom(); - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_off(); #endif bootloader_jump(); -- cgit v1.2.3