summaryrefslogtreecommitdiff
path: root/docs/feature_oled_driver.md
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 /docs/feature_oled_driver.md
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 'docs/feature_oled_driver.md')
-rw-r--r--docs/feature_oled_driver.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index c90aabb9c6..c97843cfb3 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -21,13 +21,23 @@ Hardware configurations using Arm-based microcontrollers or different sizes of O
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
```make
-OLED_DRIVER_ENABLE = yes
+OLED_ENABLE = yes
+```
+
+## OLED type
+|OLED Driver |Supported Device |
+|-------------------|---------------------------|
+|SSD1306 (default) |For both SSD1306 and SH1106|
+
+e.g.
+```make
+OLED_DRIVER = SSD1306
```
Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```c
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
@@ -114,7 +124,7 @@ static void fade_display(void) {
In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
```c
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand