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/anavi/macropad8/config.h | 2 +- keyboards/anavi/macropad8/keymaps/default/keymap.c | 2 +- keyboards/anavi/macropad8/keymaps/git/keymap.c | 2 +- keyboards/anavi/macropad8/keymaps/kicad/keymap.c | 4 ++-- keyboards/anavi/macropad8/keymaps/kodi/keymap.c | 2 +- keyboards/anavi/macropad8/keymaps/obs/keymap.c | 2 +- keyboards/anavi/macropad8/keymaps/zoom/keymap.c | 2 +- keyboards/anavi/macropad8/rules.mk | 3 ++- 8 files changed, 10 insertions(+), 9 deletions(-) (limited to 'keyboards/anavi') diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h index fd9d6e3571..4ec8c73123 100644 --- a/keyboards/anavi/macropad8/config.h +++ b/keyboards/anavi/macropad8/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . # define RGBLIGHT_LIMIT_VAL 255 #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # define OLED_DISPLAY_128X64 # define OLED_TIMEOUT 60000 # define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c" diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c index 68fbdf0d14..5b69532e1b 100644 --- a/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/git/keymap.c b/keyboards/anavi/macropad8/keymaps/git/keymap.c index 0b0099fd52..c1f1681ec0 100644 --- a/keyboards/anavi/macropad8/keymaps/git/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/git/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c index 938d0d53f0..ba47550347 100644 --- a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c @@ -50,7 +50,7 @@ const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; * F1 - zoom in * F2 - zoom out * F4 - zoom center - * + * */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 72022a01bb..61cedc8109 100644 --- a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/keyboards/anavi/macropad8/keymaps/obs/keymap.c index 0c78883cf3..e740482bbd 100644 --- a/keyboards/anavi/macropad8/keymaps/obs/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/obs/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c index 64f4f5b01b..ef47102fa5 100644 --- a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk index 961ed63e0f..63a7bb719a 100644 --- a/keyboards/anavi/macropad8/rules.mk +++ b/keyboards/anavi/macropad8/rules.mk @@ -24,7 +24,8 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output on port C6 BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -- cgit v1.2.1