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/feature_oled_driver.md | |
| parent | b9ed9d33d3b57627e919e771f62ff1cbecf0c8d4 (diff) | |
| download | qmk_firmware-5cecc1ea1ec8df3b74d01f96336dee2c2f5c6f4e.tar.gz qmk_firmware-5cecc1ea1ec8df3b74d01f96336dee2c2f5c6f4e.zip | |
Add brightness level API to OLED driver (#10772)
* Add brightness level API to OLED driver
* Set default brightness to 255
Diffstat (limited to 'docs/feature_oled_driver.md')
| -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 9e33a321c..9f0ef1664 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md | |||
| @@ -140,8 +140,8 @@ void oled_task_user(void) { | |||
| 140 | |---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| | 140 | |---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| |
| 141 | |`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | | 141 | |`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | |
| 142 | |`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | | 142 | |`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | |
| 143 | |`OLED_FONT_START` |`0` |The starting characer index for custom fonts | | 143 | |`OLED_FONT_START` |`0` |The starting character index for custom fonts | |
| 144 | |`OLED_FONT_END` |`223` |The ending characer index for custom fonts | | 144 | |`OLED_FONT_END` |`223` |The ending character index for custom fonts | |
| 145 | |`OLED_FONT_WIDTH` |`6` |The font width | | 145 | |`OLED_FONT_WIDTH` |`6` |The font width | |
| 146 | |`OLED_FONT_HEIGHT` |`8` |The font height (untested) | | 146 | |`OLED_FONT_HEIGHT` |`8` |The font height (untested) | |
| 147 | |`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | | 147 | |`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) { | |||
| 149 | |`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. | | 149 | |`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. | |
| 150 | |`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | | 150 | |`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | |
| 151 | |`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.| | 151 | |`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.| |
| 152 | |`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. | | ||
| 152 | 153 | ||
| 153 | ## 128x64 & Custom sized OLED Displays | 154 | ## 128x64 & Custom sized OLED Displays |
| 154 | 155 | ||
| @@ -304,6 +305,12 @@ bool oled_off(void); | |||
| 304 | // not | 305 | // not |
| 305 | bool is_oled_on(void); | 306 | bool is_oled_on(void); |
| 306 | 307 | ||
| 308 | // Sets the brightness level of the display | ||
| 309 | uint8_t oled_set_brightness(uint8_t level); | ||
| 310 | |||
| 311 | // Gets the current brightness level of the display | ||
| 312 | uint8_t oled_get_brightness(void); | ||
| 313 | |||
| 307 | // Basically it's oled_render, but with timeout management and oled_task_user calling! | 314 | // Basically it's oled_render, but with timeout management and oled_task_user calling! |
| 308 | void oled_task(void); | 315 | void oled_task(void); |
| 309 | 316 | ||
