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> --- users/snowe/oled_setup.c | 4 ++-- users/snowe/oled_setup.h | 4 ++-- users/snowe/readme_ocean_dream.md | 5 +++-- users/snowe/rules.mk | 2 +- users/snowe/snowe.h | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) (limited to 'users/snowe') diff --git a/users/snowe/oled_setup.c b/users/snowe/oled_setup.c index b3e04df458..3d21ea9f0a 100644 --- a/users/snowe/oled_setup.c +++ b/users/snowe/oled_setup.c @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include QMK_KEYBOARD_H # include "quantum.h" @@ -138,4 +138,4 @@ void oled_task_user(void) { } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/users/snowe/oled_setup.h b/users/snowe/oled_setup.h index 031ce6bd08..7281dcd766 100644 --- a/users/snowe/oled_setup.h +++ b/users/snowe/oled_setup.h @@ -18,7 +18,7 @@ #pragma once #include "quantum.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_driver.h" # define OLED_RENDER_WPM_COUNTER " WPM: " #endif @@ -27,4 +27,4 @@ #endif #ifdef OCEAN_DREAM_ENABLE # include "ocean_dream.h" -#endif \ No newline at end of file +#endif diff --git a/users/snowe/readme_ocean_dream.md b/users/snowe/readme_ocean_dream.md index ca15dd47cd..688afc8998 100644 --- a/users/snowe/readme_ocean_dream.md +++ b/users/snowe/readme_ocean_dream.md @@ -41,7 +41,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ``` 4. In your `rules.mk` to make it easier to turn the animation on/off, add ```makefile -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) #... your code here... ifdef OCEAN_DREAM_ENABLE @@ -59,7 +59,8 @@ endif You're done! Now you can enable **Ocean Dream** by simply turning on the OLED feature ```makefile -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ``` And if you want to disable it without turning off the OLED Driver you can simply set diff --git a/users/snowe/rules.mk b/users/snowe/rules.mk index a6e152c1cf..f188c90229 100644 --- a/users/snowe/rules.mk +++ b/users/snowe/rules.mk @@ -1,6 +1,6 @@ -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_setup.c ifdef OCEAN_DREAM_ENABLE diff --git a/users/snowe/snowe.h b/users/snowe/snowe.h index 4453b26469..21764ca507 100644 --- a/users/snowe/snowe.h +++ b/users/snowe/snowe.h @@ -35,7 +35,7 @@ along with this program. If not, see . //#if defined(RGB_MATRIX_ENABLE) //# include "rgb_matrix_stuff.h" //#endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_setup.h" #endif -- cgit v1.2.3