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 908bd801c..fc63e492d 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 | ``` |
@@ -237,6 +240,7 @@ bool oled_init(oled_rotation_t rotation); | |||
237 | // Called at the start of oled_init, weak function overridable by the user | 240 | // Called at the start of oled_init, weak function overridable by the user |
238 | // rotation - the value passed into oled_init | 241 | // rotation - the value passed into oled_init |
239 | // Return new oled_rotation_t if you want to override default rotation | 242 | // Return new oled_rotation_t if you want to override default rotation |
243 | oled_rotation_t oled_init_kb(oled_rotation_t rotation); | ||
240 | oled_rotation_t oled_init_user(oled_rotation_t rotation); | 244 | oled_rotation_t oled_init_user(oled_rotation_t rotation); |
241 | 245 | ||
242 | // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering | 246 | // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering |
@@ -328,7 +332,8 @@ uint8_t oled_get_brightness(void); | |||
328 | void oled_task(void); | 332 | void oled_task(void); |
329 | 333 | ||
330 | // Called at the start of oled_task, weak function overridable by the user | 334 | // Called at the start of oled_task, weak function overridable by the user |
331 | void oled_task_user(void); | 335 | bool oled_task_kb(void); |
336 | bool oled_task_user(void); | ||
332 | 337 | ||
333 | // Set the specific 8 lines rows of the screen to scroll. | 338 | // Set the specific 8 lines rows of the screen to scroll. |
334 | // 0 is the default for start, and 7 for end, which is the entire | 339 | // 0 is the default for start, and 7 for end, which is the entire |