From 18b29b26423e58ddb06a4fce24fefe8e83942e9d Mon Sep 17 00:00:00 2001 From: Barabas Raffai Date: Wed, 28 Apr 2021 18:31:32 +0100 Subject: [PATCH] Update OLED fade define names --- docs/feature_oled_driver.md | 34 +++++++++++++++++----------------- drivers/oled/oled_driver.c | 6 +++--- drivers/oled/oled_driver.h | 8 ++++---- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index e5750460da7a..d2dc6103a687 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -136,23 +136,23 @@ void oled_task_user(void) { ## Basic Configuration -|Define |Default |Description | -|-----------------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| -|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | -|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | -|`OLED_FONT_START` |`0` |The starting character index for custom fonts | -|`OLED_FONT_END` |`223` |The ending character index for custom fonts | -|`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_DRIVER_DISPLAY_FADE` |*Not defined* |Enables fade out animation. Use together with `OLED_TIMEOUT`. | -|`OLED_DRIVER_DISPLAY_FADE_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. | -|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC.| -|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. | -|`OLED_UPDATE_INTERVAL` |`0` |Set the time interval for updating the OLED display in ms. This will improve the matrix scan rate. | +|Define |Default |Description | +|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| +|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | +|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | +|`OLED_FONT_START` |`0` |The starting character index for custom fonts | +|`OLED_FONT_END` |`223` |The ending character index for custom fonts | +|`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. | +|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC.| +|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. | +|`OLED_UPDATE_INTERVAL` |`0` |Set the time interval for updating the OLED display in ms. This will improve the matrix scan rate. | ## 128x64 & Custom sized OLED Displays diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 335a5108d663..082115d53434 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -553,7 +553,7 @@ bool oled_on(void) { #endif static const uint8_t PROGMEM display_on[] = -#ifdef OLED_DRIVER_DISPLAY_FADE +#ifdef OLED_FADE_OUT {I2C_CMD, FADE_BLINK, 0x00}; #else {I2C_CMD, DISPLAY_ON}; @@ -575,8 +575,8 @@ bool oled_off(void) { } static const uint8_t PROGMEM display_off[] = -#ifdef OLED_DRIVER_DISPLAY_FADE - {I2C_CMD, FADE_BLINK, ENABLE_FADE | OLED_DRIVER_DISPLAY_FADE_INTERVAL}; +#ifdef OLED_FADE_OUT + {I2C_CMD, FADE_BLINK, ENABLE_FADE | OLED_FADE_OUT_INTERVAL}; #else {I2C_CMD, DISPLAY_OFF}; #endif diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 1070ebc07117..cbf5380ee089 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -154,12 +154,12 @@ along with this program. If not, see . # endif #endif -#if !defined(OLED_DRIVER_DISPLAY_FADE_INTERVAL) -# define OLED_DRIVER_DISPLAY_FADE_INTERVAL 0x00 +#if !defined(OLED_FADE_OUT_INTERVAL) +# define OLED_FADE_OUT_INTERVAL 0x00 #endif -#if OLED_DRIVER_DISPLAY_FADE_INTERVAL > 0x0F || OLED_DRIVER_DISPLAY_FADE_INTERVAL < 0x00 -# error OLED_DRIVER_DISPLAY_FADE_INTERVAL must be between 0x00 and 0x0F +#if OLED_FADE_OUT_INTERVAL > 0x0F || OLED_FADE_OUT_INTERVAL < 0x00 +# error OLED_FADE_OUT_INTERVAL must be between 0x00 and 0x0F #endif #if !defined(OLED_I2C_TIMEOUT)