From fca7cc1747642d077898e301945df86bfdea0784 Mon Sep 17 00:00:00 2001 From: Barabas Date: Sat, 8 May 2021 11:27:13 +0100 Subject: Added OLED fade out support (#12086) --- docs/feature_oled_driver.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/feature_oled_driver.md') diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 44202487f1..d2dc6103a6 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -145,6 +145,8 @@ void oled_task_user(void) { |`OLED_FONT_WIDTH` |`6` |The font width | |`OLED_FONT_HEIGHT` |`8` |The font height (untested) | |`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | +|`OLED_FADE_OUT` |*Not defined* |Enables fade out animation. Use together with `OLED_TIMEOUT`. | +|`OLED_FADE_OUT_INTERVAL` |`0` |The speed of fade out animation, from 0 to 15. Larger values are slower. | |`OLED_SCROLL_TIMEOUT` |`0` |Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | |`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. | |`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | -- cgit v1.2.3 From 0311c8036d693baf63ed4d3b7badf4257ffd5f46 Mon Sep 17 00:00:00 2001 From: Ignaz Kevenaar Date: Fri, 18 Jun 2021 17:08:22 +0200 Subject: Add oled_invert (#13172) Co-authored-by: Drashna Jaelre --- docs/feature_oled_driver.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/feature_oled_driver.md') diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index f3b659b1bc..c90aabb9c6 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -346,6 +346,10 @@ bool oled_scroll_left(void); // Returns true if the screen was not scrolling or stops scrolling bool oled_scroll_off(void); +// Inverts the display +// Returns true if the screen was or is inverted +bool oled_invert(bool invert); + // Returns the maximum number of characters that will fit on a line uint8_t oled_max_chars(void); -- cgit v1.2.3 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> --- docs/feature_oled_driver.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'docs/feature_oled_driver.md') 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 -- cgit v1.2.3