summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-11-01 15:42:50 -0700
committerGitHub <noreply@github.com>2021-11-02 09:42:50 +1100
commit9d235d4fc5c34f372b0c393f41686b5ef4f8dc13 (patch)
treec155fae4cd6043c3c32aa185eb05c5d1a4a5700e /docs
parentf775da96b17ceec66bac279434325b4da5cb9467 (diff)
[Core] Change OLED task function to be boolean (#14864)
* [Core] Add kb level callbacks to OLED driver * Update keyboards and keymaps * Update docs * Update userspace configs * Add fix for my keymap ... * update lefty
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_oled_driver.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index 908bd801c4..fc63e492d3 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
```c
#ifdef OLED_ENABLE
-void oled_task_user(void) {
+bool oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
@@ -62,6 +62,8 @@ void oled_task_user(void) {
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
+
+ return false;
}
#endif
```
@@ -133,13 +135,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation;
}
-void oled_task_user(void) {
+bool oled_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo(); // Renders a static logo
oled_scroll_left(); // Turns on scrolling
}
+ return false;
}
#endif
```
@@ -237,6 +240,7 @@ bool oled_init(oled_rotation_t rotation);
// Called at the start of oled_init, weak function overridable by the user
// rotation - the value passed into oled_init
// Return new oled_rotation_t if you want to override default rotation
+oled_rotation_t oled_init_kb(oled_rotation_t rotation);
oled_rotation_t oled_init_user(oled_rotation_t rotation);
// 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);
void oled_task(void);
// Called at the start of oled_task, weak function overridable by the user
-void oled_task_user(void);
+bool oled_task_kb(void);
+bool oled_task_user(void);
// Set the specific 8 lines rows of the screen to scroll.
// 0 is the default for start, and 7 for end, which is the entire