[Keyboard] Add boardsource/unicorne (#21510)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Cole Smith <smithcole@protonmail.com>
This commit is contained in:
parent
d47c4630f8
commit
327b40f593
10 changed files with 523 additions and 0 deletions
37
keyboards/boardsource/unicorne/unicorne.c
Normal file
37
keyboards/boardsource/unicorne/unicorne.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
// Copyright 2023 jack (@waffle87)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "unicorne.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()) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_raw(layer_zero, sizeof(layer_zero));
|
||||
break;
|
||||
case 1:
|
||||
oled_write_raw(layer_zero, sizeof(layer_zero));
|
||||
break;
|
||||
case 2:
|
||||
oled_write_raw(layer_zero, sizeof(layer_zero));
|
||||
break;
|
||||
case 3:
|
||||
oled_write_raw(layer_zero, sizeof(layer_zero));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
oled_write_raw(logo, sizeof(logo));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue