[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
This commit is contained in:
parent
f775da96b1
commit
9d235d4fc5
272 changed files with 967 additions and 599 deletions
|
@ -21,11 +21,14 @@
|
|||
#define ANIM_FRAME_DURATION 200
|
||||
#define ANIM_SIZE 512
|
||||
#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;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void oled_task_user(void) {
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
static uint32_t anim_timer = 0;
|
||||
static uint32_t anim_sleep = 0;
|
||||
static uint8_t current_idle_frame = 0;
|
||||
|
@ -128,7 +131,7 @@ static uint8_t current_tap_frame = 0;
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|||
#endif
|
||||
|
||||
#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
|
||||
oled_write_P(PSTR("R A R T 7 5 M\nLayer: "), false);
|
||||
|
||||
|
@ -52,6 +55,8 @@ __attribute__((weak)) 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
|
||||
|
|
|
@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void oled_task_user(void) {
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false);
|
||||
|
||||
|
@ -74,5 +74,6 @@ 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
|
||||
|
|
|
@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void oled_task_user(void) {
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false);
|
||||
|
||||
|
@ -74,5 +74,6 @@ 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
|
||||
|
|
|
@ -31,7 +31,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|||
#endif
|
||||
|
||||
#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
|
||||
oled_write_P(PSTR("R A R T L A N D\nLayer: "), false);
|
||||
|
||||
|
@ -52,5 +55,7 @@ __attribute__((weak)) 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
|
||||
|
|
|
@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void oled_task_user(void) {
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("R A R T L I C E\nLayer: "), false);
|
||||
|
||||
|
@ -56,5 +56,6 @@ 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
|
||||
|
|
|
@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void oled_task_user(void) {
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("* R A R T L I C E *\n Powered by QMK\nLayer: "), false);
|
||||
|
||||
|
@ -76,5 +76,6 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue