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/treadstone48/common/oled_helper.c | 2 +- keyboards/treadstone48/common/oled_helper.h | 2 +- keyboards/treadstone48/keymaps/default/keymap.c | 2 +- keyboards/treadstone48/keymaps/default/rules.mk | 3 ++- keyboards/treadstone48/keymaps/like_jis/keymap.c | 2 +- keyboards/treadstone48/keymaps/like_jis/rules.mk | 3 ++- keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c | 2 +- keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk | 3 ++- keyboards/treadstone48/rules.mk | 3 ++- 9 files changed, 13 insertions(+), 9 deletions(-) (limited to 'keyboards/treadstone48') diff --git a/keyboards/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c index 18d8681a4f..68adbe83a8 100644 --- a/keyboards/treadstone48/common/oled_helper.c +++ b/keyboards/treadstone48/common/oled_helper.c @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include QMK_KEYBOARD_H #include #include diff --git a/keyboards/treadstone48/common/oled_helper.h b/keyboards/treadstone48/common/oled_helper.h index 69ab705606..56c2a5b236 100644 --- a/keyboards/treadstone48/common/oled_helper.h +++ b/keyboards/treadstone48/common/oled_helper.h @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_logo(void); void update_key_status(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index 41f8f399f1..fc53d7e578 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk index 26bacb0cfe..23c4ae9542 100644 --- a/keyboards/treadstone48/keymaps/default/rules.mk +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -1,7 +1,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c index bbc6351bc2..b86ab5cdbd 100644 --- a/keyboards/treadstone48/keymaps/like_jis/keymap.c +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk index 26bacb0cfe..23c4ae9542 100644 --- a/keyboards/treadstone48/keymaps/like_jis/rules.mk +++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk @@ -1,7 +1,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here diff --git a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c index 171e034556..a6a52e0678 100644 --- a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c +++ b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk index 7380582ca1..fafe992d6f 100644 --- a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk +++ b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk @@ -1,7 +1,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # If you use connection the Rhymestone, please enable RS_EXTRA_LED diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk index 5c0cf4b92f..769ac45d57 100644 --- a/keyboards/treadstone48/rules.mk +++ b/keyboards/treadstone48/rules.mk @@ -31,6 +31,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 DEFAULT_FOLDER = treadstone48/rev1 -- cgit v1.2.3