aboutsummaryrefslogtreecommitdiff
path: root/keyboards/boardsource/unicorne/unicorne.c
blob: f9dac8d3efbc722a00ca909d3c5ef9b14ecc90b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2024 jack (@waffle87)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "lib/oled.h"

#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()) {
        render_layer_state();
    } else {
        oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img));
    }
    return false;
}
#endif