mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-30 21:38:01 +06:00
42555157b8
* added jorne-dev (kyria-based) * updated files * raw logo * removed font * Fix after rebase on master: #undef SH_TG * Fix LTO parameter name. * Fix OLED. * Add VIA Jorne layout. * readme.md * updated jorne readme * Add info.json * Update keyboards/jorne/keymaps/default/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/jorne/keymaps/default/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/jorne/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/jorne/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/jorne/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * PR changes (added GPL headers, moved oled_task_user) * info.jsoon: fix thumbs poositions, reorder keys. * fix info.json maintainer * fixed layouts * Sync config.h for VIA with default keymap. * added post_config (sets brightness to 120 or it hangs) * added SPLIT_LAYER_STATE_ENABLE/SPLIT_LED_STATE_ENABLE * Update keyboards/jorne/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/jorne/rev1/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/jorne/keymaps/via/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/jorne/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/jorne/jorne.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/jorne/jorne.c Co-authored-by: Ryan <fauxpark@gmail.com> * fixed layout, removed unnecessary defines * vendor_id set to 0x4753 Co-authored-by: beta-tank <beta-tank@outlook.com> Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
71 lines
3.4 KiB
C
71 lines
3.4 KiB
C
// Copyright 2021 Joric (@joric)
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#include "jorne.h"
|
|
|
|
#ifdef OLED_ENABLE
|
|
static void render_logo(void) {
|
|
static const char PROGMEM raw_logo[] = {
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 0, 0, 0, 192, 224, 240, 240, 240, 240, 240, 240, 240, 224,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 112, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 224, 240, 0, 0, 240, 252, 254, 255, 255, 255, 1, 240, 252, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 127, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 254, 254, 0, 0, 240,
|
|
248, 252, 30, 14, 14, 14, 14, 14, 14, 30, 252, 248, 240, 0, 0, 254, 254, 252, 28, 14, 14, 14, 14, 0, 0, 254, 254, 252, 28, 14, 14,
|
|
14, 14, 30, 252, 248, 240, 0, 0, 240, 248, 252, 222, 206, 206, 206, 206, 206, 206, 222, 252, 248, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 255, 255, 255, 254, 240, 255, 255, 255, 255, 255, 255, 248, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 193, 128, 128, 128, 192, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 255, 255, 255, 0, 0,
|
|
15, 31, 63, 120, 112, 112, 112, 112, 112, 112, 120, 63, 31, 15, 0, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 0, 0,
|
|
0, 0, 0, 127, 127, 127, 0, 0, 15, 31, 63, 121, 113, 113, 113, 113, 113, 113, 121, 61, 29, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 3, 1, 1, 3, 3, 7, 7, 7, 3, 3, 1, 3, 7, 7, 7, 7, 7, 7, 7, 3, 1, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0
|
|
};
|
|
oled_write_raw_P(raw_logo, sizeof(raw_logo));
|
|
}
|
|
|
|
enum layers {
|
|
_QWERTY = 0,
|
|
_LOWER,
|
|
_RAISE,
|
|
_ADJUST,
|
|
};
|
|
|
|
static void render_status(void) {
|
|
// Host Keyboard Layer Status
|
|
oled_write_P(PSTR("Layer: "), false);
|
|
switch (get_highest_layer(layer_state)) {
|
|
case _QWERTY:
|
|
oled_write_P(PSTR("Default\n"), false);
|
|
break;
|
|
case _LOWER:
|
|
oled_write_P(PSTR("Lower\n"), false);
|
|
break;
|
|
case _RAISE:
|
|
oled_write_P(PSTR("Raise\n"), false);
|
|
break;
|
|
case _ADJUST:
|
|
oled_write_P(PSTR("Adjust\n"), false);
|
|
break;
|
|
default:
|
|
oled_write_P(PSTR("Undefined\n"), false);
|
|
}
|
|
|
|
// Host Keyboard LED Status
|
|
led_t led_state = host_keyboard_led_state();
|
|
oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
|
|
oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
|
|
oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
|
|
}
|
|
|
|
bool oled_task_kb(void) {
|
|
if (!oled_task_user()) { return false; }
|
|
if (is_keyboard_left()) {
|
|
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
|
} else {
|
|
render_logo();
|
|
}
|
|
return true;
|
|
}
|
|
#endif
|