diff options
author | Ryan <fauxpark@gmail.com> | 2020-10-29 18:12:50 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 00:12:50 -0700 |
commit | 5cecc1ea1ec8df3b74d01f96336dee2c2f5c6f4e (patch) | |
tree | c5abcb14e22e0a9ce2476162208b45bcf6a6d77a /docs | |
parent | b9ed9d33d3b57627e919e771f62ff1cbecf0c8d4 (diff) |
Add brightness level API to OLED driver (#10772)
* Add brightness level API to OLED driver
* Set default brightness to 255
Diffstat (limited to 'docs')
-rw-r--r-- | docs/feature_oled_driver.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 9e33a321ce..9f0ef1664b 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -140,8 +140,8 @@ void oled_task_user(void) { |---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| |`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 characer index for custom fonts | -|`OLED_FONT_END` |`223` |The ending characer index 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. | @@ -149,6 +149,7 @@ void oled_task_user(void) { |`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.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC.| +|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. | ## 128x64 & Custom sized OLED Displays @@ -304,6 +305,12 @@ bool oled_off(void); // not bool is_oled_on(void); +// Sets the brightness level of the display +uint8_t oled_set_brightness(uint8_t level); + +// Gets the current brightness level of the display +uint8_t oled_get_brightness(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); |