[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
master
Drashna Jaelre 2021-11-01 15:42:50 -07:00 committed by GitHub
parent f775da96b1
commit 9d235d4fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
272 changed files with 967 additions and 599 deletions

View File

@ -38,7 +38,7 @@ Then in your `keymap.c` file, implement the OLED task call. This example assumes
```c ```c
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); 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.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
return false;
} }
#endif #endif
``` ```
@ -133,13 +135,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else { } else {
render_logo(); // Renders a static logo render_logo(); // Renders a static logo
oled_scroll_left(); // Turns on scrolling oled_scroll_left(); // Turns on scrolling
} }
return false;
} }
#endif #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 // Called at the start of oled_init, weak function overridable by the user
// rotation - the value passed into oled_init // rotation - the value passed into oled_init
// Return new oled_rotation_t if you want to override default rotation // 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); 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 // 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); void oled_task(void);
// Called at the start of oled_task, weak function overridable by the user // 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. // 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 // 0 is the default for start, and 7 for end, which is the entire

View File

@ -190,6 +190,7 @@ bool oled_init(oled_rotation_t rotation);
// Called at the start of oled_init, weak function overridable by the user // Called at the start of oled_init, weak function overridable by the user
// rotation - the value passed into oled_init // rotation - the value passed into oled_init
// Return new oled_rotation_t if you want to override default rotation // 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); 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 // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
@ -285,7 +286,8 @@ uint8_t oled_get_brightness(void);
void oled_task(void); void oled_task(void);
// Called at the start of oled_task, weak function overridable by the user // 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. // 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 // 0 is the default for start, and 7 for end, which is the entire

View File

@ -167,7 +167,7 @@ bool oled_init(oled_rotation_t rotation) {
} }
#endif #endif
oled_rotation = oled_init_user(rotation); oled_rotation = oled_init_user(oled_init_kb(rotation));
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
oled_rotation_width = OLED_DISPLAY_WIDTH; oled_rotation_width = OLED_DISPLAY_WIDTH;
} else { } else {
@ -232,6 +232,7 @@ bool oled_init(oled_rotation_t rotation) {
return true; return true;
} }
__attribute__((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return rotation; }
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; }
void oled_clear(void) { void oled_clear(void) {
@ -741,11 +742,11 @@ void oled_task(void) {
if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) {
oled_update_timeout = timer_read(); oled_update_timeout = timer_read();
oled_set_cursor(0, 0); oled_set_cursor(0, 0);
oled_task_user(); oled_task_kb();
} }
#else #else
oled_set_cursor(0, 0); oled_set_cursor(0, 0);
oled_task_user(); oled_task_kb();
#endif #endif
#if OLED_SCROLL_TIMEOUT > 0 #if OLED_SCROLL_TIMEOUT > 0
@ -776,4 +777,5 @@ void oled_task(void) {
#endif #endif
} }
__attribute__((weak)) void oled_task_user(void) {} __attribute__((weak)) bool oled_task_kb(void) { return oled_task_user(); }
__attribute__((weak)) bool oled_task_user(void) { return true; }

View File

@ -168,7 +168,7 @@ static void render_rgbled_status(bool) {
oled_write_ln_P(PSTR("\n"), false); oled_write_ln_P(PSTR("\n"), false);
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) {
render_logo(); render_logo();
@ -181,5 +181,6 @@ void oled_task_user(void) {
render_rgbled_status(true); render_rgbled_status(true);
render_logo_font(); render_logo_font();
} }
return false;
} }
#endif #endif

View File

@ -159,7 +159,7 @@ static void render_rgbled_status(void) {
oled_write_ln_P(PSTR("\n"), false); oled_write_ln_P(PSTR("\n"), false);
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) {
render_logo(); render_logo();
@ -172,5 +172,6 @@ void oled_task_user(void) {
render_rgbled_status(); render_rgbled_status();
render_logo_font(); render_logo_font();
} }
return false;
} }
#endif #endif

View File

@ -168,7 +168,7 @@ static void render_rgbled_status(bool) {
oled_write_ln_P(PSTR("\n"), false); oled_write_ln_P(PSTR("\n"), false);
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) {
render_logo(); render_logo();
@ -181,5 +181,6 @@ void oled_task_user(void) {
render_rgbled_status(true); render_rgbled_status(true);
render_logo_font(); render_logo_font();
} }
return false;
} }
#endif #endif

View File

@ -168,7 +168,7 @@ static void render_rgbled_status(void) {
oled_write_ln_P(PSTR("\n"), false); oled_write_ln_P(PSTR("\n"), false);
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) {
render_logo(); render_logo();
@ -181,5 +181,6 @@ void oled_task_user(void) {
render_rgbled_status(); render_rgbled_status();
render_logo_font(); render_logo_font();
} }
return false;
} }
#endif #endif

View File

@ -262,7 +262,7 @@ static void render_cat(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) {
render_logo(); render_logo();
@ -286,6 +286,7 @@ void oled_task_user(void) {
render_layer(); render_layer();
} }
} }
return false;
} }
#endif #endif

View File

@ -175,7 +175,7 @@ static void render_layer(void) {
oled_write_P(logo[3][2], false); oled_write_P(logo[3][2], false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) {
render_logo(); render_logo();
@ -186,5 +186,6 @@ void oled_task_user(void) {
} }
render_layer(); render_layer();
} }
return false;
} }
#endif #endif

View File

@ -175,7 +175,7 @@ static void render_layer(void) {
oled_write_P(logo[3][2], false); oled_write_P(logo[3][2], false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
static bool finished_timer = false; static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) {
render_logo(); render_logo();
@ -186,6 +186,7 @@ void oled_task_user(void) {
} }
render_layer(); render_layer();
} }
return false;
} }
#endif #endif

View File

@ -55,7 +55,10 @@ static void render_logo(void) {
} }
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { render_logo(); } bool oled_task_user(void) {
render_logo();
return false;
}
#endif #endif
bool encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {

View File

@ -55,7 +55,10 @@ static void render_logo(void) {
} }
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { render_logo(); } bool oled_task_user(void) {
render_logo();
return false;
}
#endif #endif
bool encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {

View File

@ -89,10 +89,11 @@ void render_mod_status(uint8_t modifiers) {
oled_write_ln(PSTR(" "), false); oled_write_ln(PSTR(" "), false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_layer_state(); render_layer_state();
render_keylock_status(host_keyboard_led_state()); render_keylock_status(host_keyboard_led_state());
render_mod_status(get_mods()|get_oneshot_mods()); render_mod_status(get_mods()|get_oneshot_mods());
return false;
} }
#endif #endif

View File

@ -89,10 +89,11 @@ void render_mod_status(uint8_t modifiers) {
oled_write_ln(PSTR(" "), false); oled_write_ln(PSTR(" "), false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_layer_state(); render_layer_state();
render_keylock_status(host_keyboard_led_state()); render_keylock_status(host_keyboard_led_state());
render_mod_status(get_mods()|get_oneshot_mods()); render_mod_status(get_mods()|get_oneshot_mods());
return false;
} }
#endif #endif

View File

@ -9,7 +9,7 @@ void board_init(void) {
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
} }
oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_90; // rotates the display 90 degrees return OLED_ROTATION_90; // rotates the display 90 degrees
} }

View File

@ -135,12 +135,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
print_status_narrow(); print_status_narrow();
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -138,12 +138,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
print_status_narrow(); print_status_narrow();
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -67,12 +67,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
print_status_narrow(); print_status_narrow();
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -22,7 +22,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
oled_write_P(PSTR("Active layer: "), false); oled_write_P(PSTR("Active layer: "), false);
@ -57,5 +57,6 @@ void oled_task_user(void) {
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false); oled_write_ln(rgbStatusLine2, false);
#endif #endif
return false;
} }
#endif #endif

View File

@ -105,7 +105,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
oled_write_P(PSTR("Active layer: "), false); oled_write_P(PSTR("Active layer: "), false);
@ -140,5 +140,6 @@ void oled_task_user(void) {
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false); oled_write_ln(rgbStatusLine2, false);
#endif #endif
return false;
} }
#endif #endif

View File

@ -75,7 +75,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -113,5 +113,6 @@ void oled_task_user(void) {
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false); oled_write_ln(rgbStatusLine2, false);
#endif #endif
return false;
} }
#endif #endif

View File

@ -41,7 +41,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
oled_write_P(PSTR("Active layer: "), false); oled_write_P(PSTR("Active layer: "), false);
@ -76,5 +76,6 @@ void oled_task_user(void) {
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false); oled_write_ln(rgbStatusLine2, false);
#endif #endif
return false;
} }
#endif #endif

View File

@ -58,7 +58,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
oled_write_P(PSTR("Active layer: "), false); oled_write_P(PSTR("Active layer: "), false);
@ -93,5 +93,6 @@ void oled_task_user(void) {
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false); oled_write_ln(rgbStatusLine2, false);
#endif #endif
return false;
} }
#endif #endif

View File

@ -57,7 +57,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
oled_write_P(PSTR("Active layer: "), false); oled_write_P(PSTR("Active layer: "), false);
@ -92,5 +92,6 @@ void oled_task_user(void) {
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false); oled_write_ln(rgbStatusLine2, false);
#endif #endif
return false;
} }
#endif #endif

View File

@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { bool oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
case BASE: case BASE:
@ -56,5 +56,6 @@ void oled_task_user(void) {
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
} }
#endif #endif

View File

@ -25,10 +25,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard LED Status // Host Keyboard LED Status
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
} }
#endif #endif

View File

@ -173,7 +173,7 @@ void matrix_scan_user(void) {
} }
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { bool oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
case BASE: case BASE:
@ -191,5 +191,6 @@ void oled_task_user(void) {
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
} }
#endif #endif

View File

@ -113,8 +113,9 @@ static void render_logo(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_logo(); render_logo();
return false;
} }
#endif #endif

View File

@ -149,7 +149,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
void render_status(void) { void render_status(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -177,6 +177,7 @@ void oled_task_user(void) {
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); 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.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
return false;
} }

View File

@ -298,12 +298,13 @@ static void render_logo(void) {
oled_write_raw_P(logo, 1024); oled_write_raw_P(logo, 1024);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} }
else { else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -807,12 +807,13 @@ static void render_logo(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} }
else { else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -118,7 +118,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -142,5 +142,6 @@ void oled_task_user(void) {
} else { } else {
oled_write(read_logo(), false); oled_write(read_logo(), false);
} }
return false;
} }
#endif #endif

View File

@ -118,7 +118,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -142,5 +142,6 @@ void oled_task_user(void) {
} else { } else {
oled_write(read_logo(), false); oled_write(read_logo(), false);
} }
return false;
} }
#endif #endif

View File

@ -202,7 +202,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -232,5 +232,6 @@ void oled_task_user(void) {
} else { } else {
oled_write(read_logo(), false); oled_write(read_logo(), false);
} }
return false;
} }
#endif #endif

View File

@ -99,7 +99,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -123,5 +123,6 @@ void oled_task_user(void) {
} else { } else {
render_qmk_logo(); render_qmk_logo();
} }
return false;
} }
#endif #endif

View File

@ -71,8 +71,9 @@ static void render_RIP(void) {
oled_write_raw_P(my_logo, sizeof(my_logo)); oled_write_raw_P(my_logo, sizeof(my_logo));
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_RIP(); render_RIP();
return false;
} }
#endif #endif

View File

@ -71,8 +71,9 @@ static void render_RIP(void) {
oled_write_raw_P(my_logo, sizeof(my_logo)); oled_write_raw_P(my_logo, sizeof(my_logo));
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_RIP(); render_RIP();
return false;
} }
#endif #endif

View File

@ -104,13 +104,14 @@ static void render_status(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); render_status();
} else { } else {
render_logo(); render_logo();
oled_scroll_left(); oled_scroll_left();
} }
return false;
} }
#endif #endif

View File

@ -92,13 +92,14 @@ static void render_status(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); render_status();
} else { } else {
render_logo(); render_logo();
oled_scroll_left(); oled_scroll_left();
} }
return false;
} }
#endif #endif

View File

@ -31,13 +31,12 @@ led_config_t g_led_config = { {
#endif #endif
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
__attribute__ ((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; }
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
__attribute__ ((weak)) bool oled_task_kb(void) {
void oled_task_user(void) { if (!oled_task_user()) {
return false;
}
oled_write_P(PSTR("BOSTON MK LAYER"), false); oled_write_P(PSTR("BOSTON MK LAYER"), false);
oled_advance_char(); oled_advance_char();
oled_write_char(get_highest_layer(layer_state) + 0x30, true); oled_write_char(get_highest_layer(layer_state) + 0x30, true);
@ -94,5 +93,6 @@ void oled_task_user(void) {
for (uint8_t y = 0; y < 8; y++) { for (uint8_t y = 0; y < 8; y++) {
oled_write_pixel(95, 0 + y, true); oled_write_pixel(95, 0 + y, true);
} }
return false;
} }
#endif #endif

View File

@ -39,5 +39,8 @@ static void render_logo(void) {
oled_write_P(qmk_logo, false); oled_write_P(qmk_logo, false);
} }
void oled_task_user(void) { render_logo(); } bool oled_task_user(void) {
render_logo();
return false;
}
#endif #endif

View File

@ -38,5 +38,8 @@ static void render_logo(void) {
oled_write_P(qmk_logo, false); oled_write_P(qmk_logo, false);
} }
void oled_task_user(void) { render_logo(); } bool oled_task_user(void) {
render_logo();
return false;
}
#endif #endif

View File

@ -5,16 +5,17 @@ void draw_clock(void);
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_0; }
__attribute__((weak)) void oled_task_user(void) { bool oled_task_kb(void) {
if (!oled_task_user()) { return false; }
if (!oled_task_needs_to_repaint()) { if (!oled_task_needs_to_repaint()) {
return; return false;
} }
oled_clear(); oled_clear();
if (clock_set_mode) { if (clock_set_mode) {
draw_clock(); draw_clock();
return; return false;;
} }
switch (oled_mode) { switch (oled_mode) {
default: default:
@ -25,6 +26,7 @@ __attribute__((weak)) void oled_task_user(void) {
draw_clock(); draw_clock();
break; break;
} }
return false;
} }
// Request a repaint of the OLED image without resetting the OLED sleep timer. // Request a repaint of the OLED image without resetting the OLED sleep timer.

View File

@ -101,12 +101,13 @@ void render_status(void) {
RENDER_LED_STATUS(); RENDER_LED_STATUS();
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); render_status();
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -210,8 +210,9 @@ void oled_write_layer_state(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
// If you want to change the display of OLED, you need to change here // If you want to change the display of OLED, you need to change here
oled_write_layer_state(); oled_write_layer_state();
return false;
} }
#endif #endif

View File

@ -59,7 +59,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
} }
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
@ -79,5 +79,6 @@ void oled_task_user(void) {
oled_write_P(IS_LED_ON(usb_led, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
} }
#endif #endif

View File

@ -140,7 +140,7 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) {
const char *read_keylog(void) { return keylog_str; } const char *read_keylog(void) { return keylog_str; }
const char *read_keylogs(void) { return keylogs_str; } const char *read_keylogs(void) { return keylogs_str; }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_layer_state(); render_layer_state();
oled_write_ln(read_keylog(), false); oled_write_ln(read_keylog(), false);
@ -148,6 +148,7 @@ void oled_task_user(void) {
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -130,7 +130,8 @@ void oled_render_amsterdam_flag(void) {
oled_write_raw_P(amsterdam_flag, sizeof(amsterdam_flag)); oled_write_raw_P(amsterdam_flag, sizeof(amsterdam_flag));
} }
void oled_task_user(void) { bool oled_task_user(void) {
oled_render_amsterdam_flag(); oled_render_amsterdam_flag();
return false;
} }
#endif // OLED_ENABLE #endif // OLED_ENABLE

View File

@ -128,12 +128,13 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
#endif // OLED_ENABLE #endif // OLED_ENABLE

View File

@ -157,13 +157,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -392,13 +392,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_master) { if (is_master) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -83,7 +83,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
} }
const char *read_logo(void); const char *read_logo(void);
void oled_task_user(void){ bool oled_task_user(void){
switch (biton32(layer_state)){ switch (biton32(layer_state)){
case _DVORAK: case _DVORAK:
oled_write_ln_P(PSTR("DVRK"), false); oled_write_ln_P(PSTR("DVRK"), false);
@ -102,5 +102,6 @@ void oled_task_user(void){
} }
//now print logo //now print logo
oled_write(read_logo(), false); oled_write(read_logo(), false);
return false;
} }
#endif #endif

View File

@ -43,7 +43,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180; return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_left()) { if (is_keyboard_left()) {
render_mode_icon(!get_enable_kc_lang()); render_mode_icon(!get_enable_kc_lang());
render_layer_state(); render_layer_state();
@ -51,5 +51,6 @@ void oled_task_user(void) {
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif // OLED_ENABLE #endif // OLED_ENABLE

View File

@ -246,7 +246,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_270; return OLED_ROTATION_270;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (timer_elapsed(oled_timer) > 10000) { if (timer_elapsed(oled_timer) > 10000) {
oled_off(); oled_off();
return; return;
@ -262,4 +262,5 @@ void oled_task_user(void) {
} else { } else {
render_status_secondary(); render_status_secondary();
} }
return false;
} }

View File

@ -172,7 +172,7 @@ void render_slave_oled(void) {
} }
// {OLED Task} -----------------------------------------------// // {OLED Task} -----------------------------------------------//
void oled_task_user(void) { bool oled_task_user(void) {
// First time out switches to logo as first indication of iddle. // First time out switches to logo as first indication of iddle.
if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) { if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) {
// Render logo on both halves before full timeout // Render logo on both halves before full timeout
@ -209,5 +209,6 @@ void oled_task_user(void) {
} }
} }
} }
return false;
} }
#endif #endif

View File

@ -308,7 +308,7 @@ static void render_logo(void){
* @param void. * @param void.
* @return void. * @return void.
*/ */
void oled_task_user(void){ bool oled_task_user(void){
if (timer_elapsed32(standby_oled_timer) > 15000){ if (timer_elapsed32(standby_oled_timer) > 15000){
oled_off(); oled_off();
}else{ }else{
@ -321,6 +321,7 @@ void oled_task_user(void){
oled_scroll_left(); oled_scroll_left();
} }
} }
return false;
} }
/** @brief process the current key and add it to the keylog string. /** @brief process the current key and add it to the keylog string.

View File

@ -190,13 +190,14 @@ void render_status_main(void) {
render_keylogger_status(); render_keylogger_status();
} }
void oled_task_user(void) { bool oled_task_user(void) {
update_log(); update_log();
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else { } else {
render_crkbd_logo(); render_crkbd_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -148,13 +148,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -158,13 +158,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -204,13 +204,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -290,7 +290,7 @@ void render_status(void) {
# endif # endif
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (timer_elapsed32(oled_timer) > OLED_TIMEOUT) { if (timer_elapsed32(oled_timer) > OLED_TIMEOUT) {
oled_off(); oled_off();
return; return;
@ -310,6 +310,7 @@ void oled_task_user(void) {
} }
#endif #endif
} }
return false;
} }
#endif #endif

View File

@ -300,7 +300,7 @@ void suspend_power_down_user() {
oled_off(); oled_off();
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (timer_elapsed32(oled_timer) > 30000) { if (timer_elapsed32(oled_timer) > 30000) {
oled_off(); oled_off();
return; return;
@ -314,6 +314,7 @@ void oled_task_user(void) {
} else { } else {
render_status_secondary(); render_status_secondary();
} }
return false;
} }
#endif #endif

View File

@ -137,13 +137,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@ -153,4 +154,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
#endif // OLED_ENABLE #endif // OLED_ENABLE

View File

@ -164,13 +164,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_master) { if (is_master) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -158,13 +158,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -187,13 +187,14 @@ void oled_render_logo(void) {
oled_write_P(crkbd_logo, false); oled_write_P(crkbd_logo, false);
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
oled_render_layer_state(); oled_render_layer_state();
oled_render_keylog(); oled_render_keylog();
} else { } else {
oled_render_logo(); oled_render_logo();
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -125,7 +125,7 @@ char* make_rgb_text(void){
return s; return s;
}; };
void oled_task_user(void) { bool oled_task_user(void) {
render_logo(); render_logo();
oled_set_cursor(0,3); oled_set_cursor(0,3);
if (rgbToggled) { if (rgbToggled) {
@ -137,6 +137,7 @@ void oled_task_user(void) {
oled_write_ln_P(s, false); oled_write_ln_P(s, false);
free(s); free(s);
} }
return false;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -203,7 +203,7 @@ char* make_sys_info_text(void) {
}; };
void oled_task_user(void) { bool oled_task_user(void) {
if (!sysToggled) { if (!sysToggled) {
render_logo(); render_logo();
oled_set_cursor(0,3); oled_set_cursor(0,3);
@ -221,6 +221,7 @@ void oled_task_user(void) {
free(s); free(s);
} }
} }
return false;
}; };
int concat(int a, int b) { int concat(int a, int b) {

View File

@ -67,7 +67,7 @@ static void render_logo(void) {
oled_write_raw_P(ducky_logo, LOGO_SIZE); oled_write_raw_P(ducky_logo, LOGO_SIZE);
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_logo(); render_logo();
return false;
} }

View File

@ -220,7 +220,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
#endif #endif
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -244,5 +244,6 @@ void oled_task_user(void) {
oled_write_P(PSTR("Mode: "), false); oled_write_P(PSTR("Mode: "), false);
oled_write_ln(rgb_mode_name, false); oled_write_ln(rgb_mode_name, false);
return false;
} }
#endif #endif

View File

@ -89,7 +89,7 @@ static void render_anim(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); render_anim();
oled_set_cursor(0,6); oled_set_cursor(0,6);
oled_write_P(PSTR("DUCK\nBOARD\n"), false); oled_write_P(PSTR("DUCK\nBOARD\n"), false);
@ -109,6 +109,7 @@ void oled_task_user(void) {
oled_write_P(PSTR("RGB\n"), false); oled_write_P(PSTR("RGB\n"), false);
break; break;
} }
return false;
} }
#endif #endif

View File

@ -89,7 +89,7 @@ static void render_anim(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); render_anim();
oled_set_cursor(0,6); oled_set_cursor(0,6);
oled_write_P(PSTR("DUCK\nBOARD\n"), false); oled_write_P(PSTR("DUCK\nBOARD\n"), false);
@ -109,6 +109,7 @@ void oled_task_user(void) {
oled_write_P(PSTR("RGB\n"), false); oled_write_P(PSTR("RGB\n"), false);
break; break;
} }
return false;
} }
#endif #endif

View File

@ -96,7 +96,7 @@ static void render_anim(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); render_anim();
oled_set_cursor(0,6); oled_set_cursor(0,6);
oled_write_P(PSTR("DUCK\nBOARD\n"), false); oled_write_P(PSTR("DUCK\nBOARD\n"), false);
@ -119,6 +119,7 @@ void oled_task_user(void) {
oled_write_P(PSTR("FN2\n"), false); oled_write_P(PSTR("FN2\n"), false);
break; break;
} }
return false;
} }
#endif #endif

View File

@ -186,12 +186,13 @@ static void render_status(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -200,12 +200,13 @@ static void render_status(void) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -179,12 +179,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
print_status_narrow(); print_status_narrow();
} else { } else {
render_logo(); render_logo();
} }
return false;
} }
#endif #endif

View File

@ -375,7 +375,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
print_status_narrow(); print_status_narrow();
sprintf(wpm_str, "%03d", get_current_wpm()); sprintf(wpm_str, "%03d", get_current_wpm());
@ -383,6 +383,7 @@ void oled_task_user(void) {
} else { } else {
render_anim(); render_anim();
} }
return false;
} }
#endif #endif

View File

@ -56,7 +56,8 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT(
#endif #endif
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
__attribute__((weak)) void oled_task_user(void) { bool oled_task_kb(void) {
if (!oled_task_user()) { return false; }
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
@ -95,7 +96,9 @@ __attribute__((weak)) void oled_task_user(void) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 4,253,197,197,197,197,197,197,197,197,197,197,199,192,192, 0,255,255, 0,255, 0,255,255, 0,254, 13, 27, 55,111,222,188,120,255, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0,255,197,197,197,197,197,197,197,197,197,197,253,253,255,131,254, 0, 0,255,255, 0,255,184,220,238,247,219,205,198,195,193,192,255,255,255,128,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 4,253,197,197,197,197,197,197,197,197,197,197,199,192,192, 0,255,255, 0,255, 0,255,255, 0,254, 13, 27, 55,111,222,188,120,255, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0,255,197,197,197,197,197,197,197,197,197,197,253,253,255,131,254, 0, 0,255,255, 0,255,184,220,238,247,219,205,198,195,193,192,255,255,255,128,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 3, 3, 2, 3, 0, 3, 3, 2, 3, 0, 0, 0, 0, 0, 1, 3, 2, 2, 3, 0, 8, 28, 20, 20, 20, 20, 20, 28, 8, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 3, 3, 2, 3, 0, 3, 3, 2, 3, 0, 0, 0, 0, 0, 1, 3, 2, 2, 3, 0, 8, 28, 20, 20, 20, 20, 20, 28, 8, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; };
oled_write_raw_P(ein60_logo, sizeof(ein60_logo)); oled_write_raw_P(ein60_logo, sizeof(ein60_logo));
return false;
} }
#endif #endif

View File

@ -167,11 +167,12 @@ static void render_status(void) {
oled_set_cursor(1,2); oled_set_cursor(1,2);
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_status(); render_status();
oled_write_ln_P(PSTR(""), false); oled_write_ln_P(PSTR(""), false);
render_ein60_logo(); render_ein60_logo();
return false;
} }
#endif #endif

View File

@ -104,7 +104,7 @@ static void render_ein60_logo(void) {
static void render_status(void) { static void render_status(void) {
//void oled_task_user(void) { //bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
@ -145,12 +145,13 @@ static void render_status(void) {
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_status(); render_status();
oled_write_ln_P(PSTR(""), false); oled_write_ln_P(PSTR(""), false);
render_ein60_logo(); render_ein60_logo();
return false;
} }
#endif #endif
@ -172,5 +173,3 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
} }
return true; return true;
} }

View File

@ -166,11 +166,13 @@ static void render_status(void) {
oled_set_cursor(1,2); oled_set_cursor(1,2);
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_status(); render_status();
oled_write_ln_P(PSTR(""), false); oled_write_ln_P(PSTR(""), false);
render_ein60_logo(); render_ein60_logo();
return false;
} }
#endif #endif

View File

@ -130,13 +130,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; return OLED_ROTATION_180;
} }
void oled_task_user(void) { bool oled_task_user(void) {
static const char PROGMEM font_logo[] = { static const char PROGMEM font_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
oled_write_P(font_logo, false); oled_write_P(font_logo, false);
return false;
} }
//for (int i = 0; i < fontLen; i++) { //for (int i = 0; i < fontLen; i++) {
//oled_write_char(pgm_read_byte(lain+i), false); //oled_write_char(pgm_read_byte(lain+i), false);

View File

@ -182,7 +182,7 @@ void render_status(void) {
render_keylock_status(host_keyboard_led_state()); render_keylock_status(host_keyboard_led_state());
} }
void oled_task_user(void) { bool oled_task_user(void) {
static const char PROGMEM font_logo[] = { static const char PROGMEM font_logo[] = {
0x80,0x81,0x82,0x83,0x84, 0x80,0x81,0x82,0x83,0x84,
0xa0,0xa1,0xa2,0xa3,0xa4, 0xa0,0xa1,0xa2,0xa3,0xa4,
@ -199,6 +199,7 @@ void oled_task_user(void) {
oled_write_P(font_logo, false); oled_write_P(font_logo, false);
render_status(); // Renders the current keyboard state (layer, lock) render_status(); // Renders the current keyboard state (layer, lock)
return false;
} }
#endif #endif

View File

@ -1,13 +1,12 @@
#include "ver2.h" #include "ver2.h"
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
__attribute__ ((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; }
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
__attribute__ ((weak)) bool oled_task_kb(void) {
void oled_task_user(void) { if (!oled_task_user()) {
return false;
}
oled_write_P(PSTR("LAYER "), false); oled_write_P(PSTR("LAYER "), false);
oled_write_char(get_highest_layer(layer_state) + 0x30, true); oled_write_char(get_highest_layer(layer_state) + 0x30, true);
@ -61,5 +60,6 @@ void oled_task_user(void) {
for (uint8_t y = 0; y < 8; y++) { for (uint8_t y = 0; y < 8; y++) {
oled_write_pixel(35, 0 + y, true); oled_write_pixel(35, 0 + y, true);
} }
return false;
} }
#endif #endif

View File

@ -34,13 +34,12 @@ led_config_t g_led_config = { {
#endif #endif
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
__attribute__ ((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; }
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
__attribute__ ((weak)) bool oled_task_kb(void) {
void oled_task_user(void) { if (!oled_task_user()) {
return false;
}
oled_write_P(PSTR("LAYER"), false); oled_write_P(PSTR("LAYER"), false);
oled_advance_char(); oled_advance_char();
oled_write_char(get_highest_layer(layer_state) + 0x30, true); oled_write_char(get_highest_layer(layer_state) + 0x30, true);
@ -94,5 +93,6 @@ void oled_task_user(void) {
for (uint8_t y = 0; y < 8; y++) { for (uint8_t y = 0; y < 8; y++) {
oled_write_pixel(35, 0 + y, true); oled_write_pixel(35, 0 + y, true);
} }
return false;
} }
#endif #endif

View File

@ -27,14 +27,18 @@ enum layer_names {
/* _FN */ /* _FN */
}; };
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
if (!is_keyboard_master()) { if (!is_keyboard_master()) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
} }
return rotation; return rotation;
} }
oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; }
__attribute__((weak)) void oled_task_user(void) { bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
if (!is_keyboard_master()) { if (!is_keyboard_master()) {
static const char PROGMEM qmk_logo[] = { static const char PROGMEM qmk_logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
@ -68,6 +72,7 @@ __attribute__((weak)) void oled_task_user(void) {
oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK\n") : PSTR(" \n"), false); oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK\n") : PSTR(" \n"), false);
} }
return false;
} }
#endif #endif

View File

@ -85,8 +85,9 @@ static void render_amigopunk_logo(void) {
}; };
oled_write_raw_P(amigopunk_logo, sizeof(amigopunk_logo)); oled_write_raw_P(amigopunk_logo, sizeof(amigopunk_logo));
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_amigopunk_logo(); render_amigopunk_logo();
/* oled_write_P(PSTR("Amigo Punk\n"), false); */ /* oled_write_P(PSTR("Amigo Punk\n"), false); */
return false;
} }
#endif #endif

View File

@ -251,7 +251,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_0; return OLED_ROTATION_0;
} }
void oled_task_user(void) { bool oled_task_user(void) {
/* Host Keyboard Layer Status */ /* Host Keyboard Layer Status */
uint8_t current_layer = get_highest_layer(layer_state); uint8_t current_layer = get_highest_layer(layer_state);
@ -337,5 +337,6 @@ void oled_task_user(void) {
} }
} }
return false;
} }
#endif #endif

View File

@ -196,7 +196,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_0; return OLED_ROTATION_0;
} }
void oled_task_user(void) { bool oled_task_user(void) {
/* Host Keyboard Layer Status */ /* Host Keyboard Layer Status */
uint8_t current_layer = get_highest_layer(layer_state); uint8_t current_layer = get_highest_layer(layer_state);
@ -282,5 +282,6 @@ void oled_task_user(void) {
} }
} }
return false;
} }
#endif #endif

View File

@ -115,7 +115,7 @@ void write_quote(const char* data, const uint8_t num_lines) {
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_logo(); render_logo();
oled_advance_page(/* clearPageRemainder */ true); oled_advance_page(/* clearPageRemainder */ true);
@ -559,6 +559,7 @@ void oled_task_user(void) {
break; break;
} }
} }
return false;
} }
bool encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {

View File

@ -156,7 +156,7 @@ static void render_anim(void) {
} }
// Used to draw on to the oled screen // Used to draw on to the oled screen
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); // renders pixelart render_anim(); // renders pixelart
oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (4 rows, 21 full columns on a 128x32 screen, anything more will overflow back to the top) oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (4 rows, 21 full columns on a 128x32 screen, anything more will overflow back to the top)
@ -194,5 +194,6 @@ void oled_task_user(void) {
} }
oled_set_cursor(17, 3); oled_set_cursor(17, 3);
oled_write_P(PSTR("NKRO"), keymap_config.nkro); oled_write_P(PSTR("NKRO"), keymap_config.nkro);
return false;
} }
#endif #endif

View File

@ -195,12 +195,13 @@ void render_keylogger_status(void) {
// [OLED Init] ------------------------------------------------------// // [OLED Init] ------------------------------------------------------//
// Rotate Screen // Rotate Screen
oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; }
return OLED_ROTATION_180;
}
// {OLED Task} ------------------------------------------------------// // {OLED Task} ------------------------------------------------------//
void oled_task_user(void) { bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
// MASTER SIDE // MASTER SIDE
if (is_keyboard_master()) { if (is_keyboard_master()) {
@ -225,5 +226,5 @@ if (is_keyboard_master()) {
else { else {
render_skeeb_logo(); render_skeeb_logo();
} }
return false;
} }

View File

@ -342,7 +342,7 @@ void matrix_init_user(void) {
set_unicode_input_mode(UC_WINC); set_unicode_input_mode(UC_WINC);
}; };
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
void oled_task_user(void) { bool oled_task_user(void) {
oled_write_P(PSTR(" spaget v1\n\n"), false); oled_write_P(PSTR(" spaget v1\n\n"), false);
// Host Keyboard Layer Status // Host Keyboard Layer Status
@ -368,6 +368,7 @@ void oled_task_user(void) {
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCROLL ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCROLL ") : PSTR(" "), false);
return false;
} }
#endif #endif

View File

@ -361,7 +361,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
if (update_speed_test) { if (update_speed_test) {
// Speed test mode - wait for screen update completion. // Speed test mode - wait for screen update completion.
if (!oled_dirty) { if (!oled_dirty) {
@ -450,6 +450,7 @@ void oled_task_user(void) {
oled_write_P(PSTR("Draw Once"), false); oled_write_P(PSTR("Draw Once"), false);
break; break;
} }
return false;
} }
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {

View File

@ -66,7 +66,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
//return OLED_ROTATION_180; //return OLED_ROTATION_180;
return OLED_ROTATION_180; return OLED_ROTATION_180;
} }
void oled_task_user(void) { bool oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
/*oled_write_P(PSTR("Lyr: "), false); /*oled_write_P(PSTR("Lyr: "), false);
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
@ -92,5 +92,6 @@ void oled_task_user(void) {
}; };
oled_write_P(qmk_logo, false); oled_write_P(qmk_logo, false);
return false;
} }
#endif #endif

View File

@ -66,8 +66,9 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation; return rotation;
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_oled(); render_oled();
return false;
} }
#endif #endif

View File

@ -18,11 +18,14 @@
// OLED Code inspired by https://github.com/qmk/qmk_firmware/blob/master/keyboards/splitkb/kyria/rev1/rev1.c // OLED Code inspired by https://github.com/qmk/qmk_firmware/blob/master/keyboards/splitkb/kyria/rev1/rev1.c
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_180; return OLED_ROTATION_180;
} }
__attribute__((weak)) void oled_task_user(void) { bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
if (is_keyboard_master()) { if (is_keyboard_master()) {
static const char PROGMEM qmk_logo[] = { static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
@ -126,5 +129,6 @@ __attribute__((weak)) void oled_task_user(void) {
}; };
oled_write_raw_P(split65_logo, sizeof(split65_logo)); oled_write_raw_P(split65_logo, sizeof(split65_logo));
} }
return false;
} }
#endif #endif

View File

@ -119,7 +119,8 @@ static void render_anim(void){
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); render_anim();
return false;
} }
#endif #endif

View File

@ -119,7 +119,8 @@ static void render_anim(void){
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); render_anim();
return false;
} }
#endif #endif

View File

@ -99,7 +99,8 @@ static void render_anim(void){
} }
} }
void oled_task_user(void) { bool oled_task_user(void) {
render_anim(); render_anim();
return false;
} }
#endif #endif

Some files were not shown because too many files have changed in this diff Show More