mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-23 20:03:01 +00:00
a461f607e7
* Add Kudox Full keyboard * Add keyboards/kudox_full SPDX identifier * Modify rule.mk of keyboards/kudox_full * Remove html code from README of keyboards/kudox_full * Modify readme of keyboards/kudox_full * rev1.c includes rev1.h - kudox-full/rev1 * Move to <keyboard>.c oled_task_user and eeconfig_init_user * Move post_config.h MOUSEKEY_* * Change BOOTMAGIC_ENABLE no kudox_full * Modify the obsoleted codes * Modify eeconfig_init_kb from eeconfig_init_user * Set none as default, but values * Add about the bootloader on kudox_full/readme * Modify the comments in keyboards/kudox_full/rules.mk
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
// Copyright 2021 Kumao Kobo (@kumaokobo)
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#include "kudox_full.h"
|
|
|
|
#ifdef RGBLIGHT_ENABLE
|
|
void eeconfig_init_kb(void) {
|
|
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
|
};
|
|
#endif
|
|
|
|
#ifdef OLED_ENABLE
|
|
bool oled_task_kb(void) {
|
|
if (!oled_task_user()) { return false; }
|
|
// Host Keyboard Layer Status
|
|
oled_write_ln_P(PSTR("Kudox Keyboard"), false);
|
|
switch (get_highest_layer(layer_state)) {
|
|
case 0:
|
|
oled_write_ln_P(PSTR("\n"), false);
|
|
break;
|
|
case 1:
|
|
oled_write_ln_P(PSTR("\nLayer: Symbol"), false);
|
|
break;
|
|
case 2:
|
|
oled_write_ln_P(PSTR("\nLayer: Function"), false);
|
|
break;
|
|
case 3:
|
|
oled_write_ln_P(PSTR("\nLayer: Light"), false);
|
|
break;
|
|
default:
|
|
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
|
oled_write_ln_P(PSTR("\nLayer: Undefined"), false);
|
|
}
|
|
// Host Keyboard LED Status
|
|
led_t led_state = host_keyboard_led_state();
|
|
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 true;
|
|
}
|
|
#endif
|