[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>
This commit is contained in:
Xelus22 2021-08-24 16:28:26 +10:00 committed by GitHub
parent 6fd20acf4b
commit 4e1c5887c5
Failed to generate hash of commit
500 changed files with 1579 additions and 1387 deletions

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -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
#endif

View file

@ -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

View file

@ -1,6 +1,6 @@
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
ifeq ($(strip $(OLED_ENABLE)), yes)
SRC += oled_setup.c
ifdef OCEAN_DREAM_ENABLE

View file

@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#if defined(RGB_MATRIX_ENABLE)
//# include "rgb_matrix_stuff.h"
//#endif
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
# include "oled_setup.h"
#endif