summaryrefslogtreecommitdiff
path: root/keyboards/sofle
diff options
context:
space:
mode:
authorXelus22 <17491233+Xelus22@users.noreply.github.com>2021-08-24 16:28:26 +1000
committerGitHub <noreply@github.com>2021-08-24 16:28:26 +1000
commit4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 (patch)
tree24ff5bdf570a6a9f5a77a517005bffbb35e46b22 /keyboards/sofle
parent6fd20acf4be76e7a2bd82d3dfd0a9bcca8c507eb (diff)
[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 <drashna@live.com> Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
Diffstat (limited to 'keyboards/sofle')
-rw-r--r--keyboards/sofle/keymaps/default/keymap.c2
-rw-r--r--keyboards/sofle/keymaps/default/rules.mk3
-rw-r--r--keyboards/sofle/keymaps/devdev/keymap.c2
-rw-r--r--keyboards/sofle/keymaps/devdev/rules.mk3
-rw-r--r--keyboards/sofle/keymaps/helltm/keymap.c2
-rw-r--r--keyboards/sofle/keymaps/helltm/rules.mk3
-rw-r--r--keyboards/sofle/keymaps/killmaster/keymap.c4
-rw-r--r--keyboards/sofle/keymaps/rgb_default/keymap.c2
-rw-r--r--keyboards/sofle/keymaps/rgb_default/rules.mk3
-rw-r--r--keyboards/sofle/keymaps/via/oled.c32
-rw-r--r--keyboards/sofle/keymaps/via/rules.mk5
-rw-r--r--keyboards/sofle/rev1/rules.mk3
12 files changed, 35 insertions, 29 deletions
diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c
index 2360a45d47..a64d274b55 100644
--- a/keyboards/sofle/keymaps/default/keymap.c
+++ b/keyboards/sofle/keymaps/default/keymap.c
@@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
diff --git a/keyboards/sofle/keymaps/default/rules.mk b/keyboards/sofle/keymaps/default/rules.mk
index 6da1df16fd..e87a55ede4 100644
--- a/keyboards/sofle/keymaps/default/rules.mk
+++ b/keyboards/sofle/keymaps/default/rules.mk
@@ -1,5 +1,6 @@
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306
ENCODER_ENABLE = yes
CONSOLE_ENABLE = yes
EXTRAKEY_ENABLE = yes
diff --git a/keyboards/sofle/keymaps/devdev/keymap.c b/keyboards/sofle/keymaps/devdev/keymap.c
index 681e7dd6a4..a0945b28f0 100644
--- a/keyboards/sofle/keymaps/devdev/keymap.c
+++ b/keyboards/sofle/keymaps/devdev/keymap.c
@@ -393,7 +393,7 @@ void keyboard_post_init_user(void) {
}
#endif
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
diff --git a/keyboards/sofle/keymaps/devdev/rules.mk b/keyboards/sofle/keymaps/devdev/rules.mk
index 3dffb03689..92a293196f 100644
--- a/keyboards/sofle/keymaps/devdev/rules.mk
+++ b/keyboards/sofle/keymaps/devdev/rules.mk
@@ -4,4 +4,5 @@ CONSOLE_ENABLE = yes
RGBLIGHT_ENABLE = yes
ENCODER_ENABLE = yes
LTO_ENABLE = yes
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306
diff --git a/keyboards/sofle/keymaps/helltm/keymap.c b/keyboards/sofle/keymaps/helltm/keymap.c
index 507b9e6d73..3e1bcc82ea 100644
--- a/keyboards/sofle/keymaps/helltm/keymap.c
+++ b/keyboards/sofle/keymaps/helltm/keymap.c
@@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
/* 32 * 32 logo */
static void render_logo(void) {
diff --git a/keyboards/sofle/keymaps/helltm/rules.mk b/keyboards/sofle/keymaps/helltm/rules.mk
index 9601ec40bc..b905bd94fc 100644
--- a/keyboards/sofle/keymaps/helltm/rules.mk
+++ b/keyboards/sofle/keymaps/helltm/rules.mk
@@ -1,4 +1,5 @@
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306
ENCODER_ENABLE = yes
CONSOLE_ENABLE = yes
EXTRAKEY_ENABLE = yes
diff --git a/keyboards/sofle/keymaps/killmaster/keymap.c b/keyboards/sofle/keymaps/killmaster/keymap.c
index 950dee36b1..34c07f3c45 100644
--- a/keyboards/sofle/keymaps/killmaster/keymap.c
+++ b/keyboards/sofle/keymaps/killmaster/keymap.c
@@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM bananas_logo[] = {
@@ -221,7 +221,7 @@ void oled_task_user(void) {
-#endif // OLED_DRIVER_ENABLE
+#endif // OLED_ENABLE
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
diff --git a/keyboards/sofle/keymaps/rgb_default/keymap.c b/keyboards/sofle/keymaps/rgb_default/keymap.c
index bd0993c994..13edbc5207 100644
--- a/keyboards/sofle/keymaps/rgb_default/keymap.c
+++ b/keyboards/sofle/keymaps/rgb_default/keymap.c
@@ -393,7 +393,7 @@ void keyboard_post_init_user(void) {
}
#endif
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
diff --git a/keyboards/sofle/keymaps/rgb_default/rules.mk b/keyboards/sofle/keymaps/rgb_default/rules.mk
index 3dffb03689..92a293196f 100644
--- a/keyboards/sofle/keymaps/rgb_default/rules.mk
+++ b/keyboards/sofle/keymaps/rgb_default/rules.mk
@@ -4,4 +4,5 @@ CONSOLE_ENABLE = yes
RGBLIGHT_ENABLE = yes
ENCODER_ENABLE = yes
LTO_ENABLE = yes
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306
diff --git a/keyboards/sofle/keymaps/via/oled.c b/keyboards/sofle/keymaps/via/oled.c
index 06839da170..8a230f0001 100644
--- a/keyboards/sofle/keymaps/via/oled.c
+++ b/keyboards/sofle/keymaps/via/oled.c
@@ -1,23 +1,23 @@
/* Copyright 2020 Josef Adamcik
* Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
//Sets up what the OLED screens display.
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
@@ -81,4 +81,4 @@ void oled_task_user(void) {
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/sofle/keymaps/via/rules.mk b/keyboards/sofle/keymaps/via/rules.mk
index f482499d4b..db254512af 100644
--- a/keyboards/sofle/keymaps/via/rules.mk
+++ b/keyboards/sofle/keymaps/via/rules.mk
@@ -1,7 +1,8 @@
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306
ENCODER_ENABLE = yes
CONSOLE_ENABLE = no
EXTRAKEY_ENABLE = yes
VIA_ENABLE = yes
LTO_ENABLE = yes
-RGBLIGHT_ENABLE = yes \ No newline at end of file
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/sofle/rev1/rules.mk b/keyboards/sofle/rev1/rules.mk
index 2ba231d86b..46ec39ee48 100644
--- a/keyboards/sofle/rev1/rules.mk
+++ b/keyboards/sofle/rev1/rules.mk
@@ -1,2 +1,3 @@
ENCODER_ENABLE = yes
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306