2024-07-10 21:19:06 +02:00
|
|
|
// Copyright 2024 jack (@waffle87)
|
2023-07-21 01:57:08 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2024-07-10 21:19:06 +02:00
|
|
|
#include "quantum.h"
|
|
|
|
#include "lib/oled.h"
|
2023-07-21 01:57:08 +02:00
|
|
|
|
|
|
|
#ifdef OLED_ENABLE
|
|
|
|
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
|
|
|
if (!is_keyboard_master()) {
|
|
|
|
return OLED_ROTATION_180;
|
|
|
|
}
|
|
|
|
return rotation;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool oled_task_kb(void) {
|
|
|
|
if (!oled_task_user()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (is_keyboard_master()) {
|
2024-07-10 21:19:06 +02:00
|
|
|
render_layer_state();
|
2023-07-21 01:57:08 +02:00
|
|
|
} else {
|
2024-07-10 21:19:06 +02:00
|
|
|
oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img));
|
2023-07-21 01:57:08 +02:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#endif
|