diff options
Diffstat (limited to 'docs/feature_oled_driver.md')
| -rw-r--r-- | docs/feature_oled_driver.md | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 6d82aa0f5..0c926f674 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md | |||
| @@ -38,7 +38,7 @@ Then in your `keymap.c` file, implement the OLED task call. This example assumes | |||
| 38 | 38 | ||
| 39 | ```c | 39 | ```c |
| 40 | #ifdef OLED_ENABLE | 40 | #ifdef OLED_ENABLE |
| 41 | void oled_task_user(void) { | 41 | bool oled_task_user(void) { |
| 42 | // Host Keyboard Layer Status | 42 | // Host Keyboard Layer Status |
| 43 | oled_write_P(PSTR("Layer: "), false); | 43 | oled_write_P(PSTR("Layer: "), false); |
| 44 | 44 | ||
| @@ -62,6 +62,8 @@ void oled_task_user(void) { | |||
| 62 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | 62 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
| 63 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | 63 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
| 64 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | 64 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
| 65 | |||
| 66 | return false; | ||
| 65 | } | 67 | } |
| 66 | #endif | 68 | #endif |
| 67 | ``` | 69 | ``` |
| @@ -133,13 +135,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { | |||
| 133 | return rotation; | 135 | return rotation; |
| 134 | } | 136 | } |
| 135 | 137 | ||
| 136 | void oled_task_user(void) { | 138 | bool oled_task_user(void) { |
| 137 | if (is_keyboard_master()) { | 139 | if (is_keyboard_master()) { |
| 138 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | 140 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) |
| 139 | } else { | 141 | } else { |
| 140 | render_logo(); // Renders a static logo | 142 | render_logo(); // Renders a static logo |
| 141 | oled_scroll_left(); // Turns on scrolling | 143 | oled_scroll_left(); // Turns on scrolling |
| 142 | } | 144 | } |
| 145 | return false; | ||
| 143 | } | 146 | } |
| 144 | #endif | 147 | #endif |
| 145 | ``` | 148 | ``` |
| @@ -242,6 +245,7 @@ bool oled_init(oled_rotation_t rotation); | |||
| 242 | // Called at the start of oled_init, weak function overridable by the user | 245 | // Called at the start of oled_init, weak function overridable by the user |
| 243 | // rotation - the value passed into oled_init | 246 | // rotation - the value passed into oled_init |
| 244 | // Return new oled_rotation_t if you want to override default rotation | 247 | // Return new oled_rotation_t if you want to override default rotation |
| 248 | oled_rotation_t oled_init_kb(oled_rotation_t rotation); | ||
| 245 | oled_rotation_t oled_init_user(oled_rotation_t rotation); | 249 | oled_rotation_t oled_init_user(oled_rotation_t rotation); |
| 246 | 250 | ||
| 247 | // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering | 251 | // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering |
| @@ -333,7 +337,8 @@ uint8_t oled_get_brightness(void); | |||
| 333 | void oled_task(void); | 337 | void oled_task(void); |
| 334 | 338 | ||
| 335 | // Called at the start of oled_task, weak function overridable by the user | 339 | // Called at the start of oled_task, weak function overridable by the user |
| 336 | void oled_task_user(void); | 340 | bool oled_task_kb(void); |
| 341 | bool oled_task_user(void); | ||
| 337 | 342 | ||
| 338 | // Set the specific 8 lines rows of the screen to scroll. | 343 | // Set the specific 8 lines rows of the screen to scroll. |
| 339 | // 0 is the default for start, and 7 for end, which is the entire | 344 | // 0 is the default for start, and 7 for end, which is the entire |
