Changes made, added VIA keymap, cleaned formatting

This commit is contained in:
James Gzowski 2024-09-27 13:45:58 +01:00
parent 642bee3b6e
commit 68f0b52b03
4 changed files with 173 additions and 144 deletions

View File

@ -2,63 +2,63 @@
"manufacturer": "gzowski", "manufacturer": "gzowski",
"keyboard_name": "Somei70", "keyboard_name": "Somei70",
"maintainer": "gzowski", "maintainer": "gzowski",
"processor": "RP2040",
"bootloader": "rp2040", "bootloader": "rp2040",
"diode_direction": "COL2ROW", "diode_direction": "COL2ROW",
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"extrakey": true, "extrakey": true,
"oled": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"wpm": true, "oled": true,
"rgb_matrix": true "rgb_matrix": true,
}, "wpm": true
"rgb_matrix": {
"animations": {
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"cycle_all": true,
"cycle_left_right": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"dual_beacon": true,
"rainbow_beacon": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
},
"led_flush_limit": 14,
"max_brightness": 200,
"led_process_limit": 5,
"sleep": true
"driver": "ws2812",
"layout": [
{"flags": 4, "matrix": [0, 0], "x": 0, "y": 0},
{"flags": 4, "matrix": [0, 1], "x": 16, "y": 0},
{"flags": 4, "matrix": [0, 2], "x": 33, "y": 0},
{"flags": 4, "matrix": [0, 3], "x": 49, "y": 0},
{"flags": 4, "matrix": [0, 4], "x": 65, "y": 0},
{"flags": 4, "matrix": [0, 5], "x": 81, "y": 0},
{"flags": 4, "matrix": [0, 6], "x": 86, "y": 0},
{"flags": 4, "matrix": [0, 7], "x": 102, "y": 0},
{"flags": 4, "matrix": [0, 8], "x": 118, "y": 0},
{"flags": 4, "matrix": [0, 9], "x": 134, "y": 0},
{"flags": 4, "matrix": [0, 10], "x": 150, "y": 0},
{"flags": 4, "matrix": [0, 11], "x": 166, "y": 0},
{"flags": 4, "matrix": [0, 12], "x": 182, "y": 0},
{"flags": 4, "matrix": [0, 13], "x": 206, "y": 0}
]
}, },
"matrix_pins": { "matrix_pins": {
"cols": ["GP28", "GP27", "GP26", "GP22", "GP20", "GP23", "GP21", "GP16", "GP15", "GP14", "GP13", "GP12", "GP9", "GP8", "GP7"], "cols": ["GP28", "GP27", "GP26", "GP22", "GP20", "GP23", "GP21", "GP16", "GP15", "GP14", "GP13", "GP12", "GP9", "GP8", "GP7"],
"rows": ["GP1", "GP29", "GP6", "GP5", "GP4"] "rows": ["GP1", "GP29", "GP6", "GP5", "GP4"]
}, },
"processor": "RP2040",
"rgb_matrix": {
"animations": {
"band_sat": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"dual_beacon": true,
"gradient_left_right": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"jellybean_raindrops": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"raindrops": true
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 33, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 49, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 65, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 81, "y": 0, "flags": 4},
{"matrix": [0, 6], "x": 86, "y": 0, "flags": 4},
{"matrix": [0, 7], "x": 102, "y": 0, "flags": 4},
{"matrix": [0, 8], "x": 118, "y": 0, "flags": 4},
{"matrix": [0, 9], "x": 134, "y": 0, "flags": 4},
{"matrix": [0, 10], "x": 150, "y": 0, "flags": 4},
{"matrix": [0, 11], "x": 166, "y": 0, "flags": 4},
{"matrix": [0, 12], "x": 182, "y": 0, "flags": 4},
{"matrix": [0, 13], "x": 206, "y": 0, "flags": 4}
],
"led_flush_limit": 14,
"led_process_limit": 5,
"max_brightness": 200,
"sleep": true
},
"url": "https://github.com/gzowski/somei70", "url": "https://github.com/gzowski/somei70",
"usb": { "usb": {
"device_version": "1.0.0", "device_version": "1.0.0",
@ -66,8 +66,8 @@
"vid": "0x73CA" "vid": "0x73CA"
}, },
"ws2812": { "ws2812": {
"pin": "GP0", "driver": "vendor",
"driver": "vendor" "pin": "GP0"
}, },
"layouts": { "layouts": {
"LAYOUT_5x15": { "LAYOUT_5x15": {
@ -82,7 +82,7 @@
{"matrix": [0, 7], "x": 7, "y": 0}, {"matrix": [0, 7], "x": 7, "y": 0},
{"matrix": [0, 8], "x": 8, "y": 0}, {"matrix": [0, 8], "x": 8, "y": 0},
{"matrix": [0, 9], "x": 9, "y": 0}, {"matrix": [0, 9], "x": 9, "y": 0},
{"matrix": [0, 10], "x": 10, "y": 0}, {"matrix": [0, 10], "x": 10, "y": 0},
{"matrix": [0, 11], "x": 11, "y": 0}, {"matrix": [0, 11], "x": 11, "y": 0},
{"matrix": [0, 12], "x": 12, "y": 0}, {"matrix": [0, 12], "x": 12, "y": 0},
{"matrix": [0, 13], "x": 13, "y": 0}, {"matrix": [0, 13], "x": 13, "y": 0},
@ -114,8 +114,8 @@
{"matrix": [2, 11], "x": 11, "y": 2}, {"matrix": [2, 11], "x": 11, "y": 2},
{"matrix": [2, 12], "x": 12, "y": 2}, {"matrix": [2, 12], "x": 12, "y": 2},
{"matrix": [2, 13], "x": 13, "y": 2}, {"matrix": [2, 13], "x": 13, "y": 2},
{"matrix": [2, 14], "x": 14, "y": 2}, {"matrix": [2, 14], "x": 14, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3}, {"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3}, {"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3}, {"matrix": [3, 2], "x": 2, "y": 3},
{"matrix": [3, 3], "x": 3, "y": 3}, {"matrix": [3, 3], "x": 3, "y": 3},
@ -130,7 +130,7 @@
{"matrix": [3, 12], "x": 12, "y": 3}, {"matrix": [3, 12], "x": 12, "y": 3},
{"matrix": [3, 13], "x": 13, "y": 3}, {"matrix": [3, 13], "x": 13, "y": 3},
{"matrix": [3, 14], "x": 14, "y": 3}, {"matrix": [3, 14], "x": 14, "y": 3},
{"matrix": [4, 0], "x": 0, "y": 4}, {"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4}, {"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2, "y": 4}, {"matrix": [4, 2], "x": 2, "y": 4},
{"matrix": [4, 3], "x": 3, "y": 4}, {"matrix": [4, 3], "x": 3, "y": 4},
@ -141,7 +141,7 @@
{"matrix": [4, 8], "x": 8, "y": 4}, {"matrix": [4, 8], "x": 8, "y": 4},
{"matrix": [4, 9], "x": 9, "y": 4}, {"matrix": [4, 9], "x": 9, "y": 4},
{"matrix": [4, 10], "x": 10, "y": 4}, {"matrix": [4, 10], "x": 10, "y": 4},
{"matrix": [4, 11], "x": 11, "y": 4}, {"matrix": [4, 11], "x": 11, "y": 4}
] ]
} }
} }

View File

@ -1,33 +1,34 @@
// Copyright 2024 James Gzowski // Copyright 2024 James Gzowski
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum custom_layer { enum custom_layer {
_LAYERA, _LAYERA,
_LAYERB, _LAYERB,
_LAYERC _LAYERC
}; };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYERA] = LAYOUT_5x15( [_LAYERA] = LAYOUT_5x15(
KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS,KC_EQL ,KC_BSPC, KC_ESC ,KC_1 ,K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t esc_press_count = 0;
static uint16_t esc_timer = 0; static uint16_t esc_timer = 0;
//Stats display //Stats display
void render_stats(void) { void render_stats(void)
char wpm_str[10]; {
snprintf(wpm_str, sizeof(wpm_str), "WPM: %03u", get_current_wpm()); char wpm_str[10];
oled_write_ln(wpm_str, false); snprintf(wpm_str, sizeof(wpm_str), "WPM: %03u", get_current_wpm());
if (host_keyboard_led_state().caps_lock) { oled_write_ln(wpm_str, false);
oled_write_P(PSTR("CAPS: On "), false); if (host_keyboard_led_state().caps_lock)
} else { {
oled_write_P(PSTR("CAPS: Off "), false); oled_write_P(PSTR("CAPS: On "), false);
} }
if (keymap_config.nkro) { else
oled_write_ln("NKRO: On", false); {
} else { oled_write_P(PSTR("CAPS: Off "), false);
oled_write_ln("NKRO: Off", false); }
}
uint8_t brightness = rgblight_get_val(); if (keymap_config.nkro)
char brightness_str[255]; {
snprintf(brightness_str, sizeof(brightness_str), "LED Brightness: %03u", brightness); oled_write_ln("NKRO: On", false);
oled_write_ln(brightness_str, false); }
oled_write_ln(PSTR("P: 0x6F64 V: 0x73CA"), false); else
{
oled_write_ln("NKRO: Off", false);
}
uint8_t brightness = rgblight_get_val();
char brightness_str[255];
snprintf(brightness_str, sizeof(brightness_str), "LED Brightness: %03u", brightness);
oled_write_ln(brightness_str, false);
oled_write_ln(PSTR("P: 0x6F64 V: 0x73CA"), false);
} }
//Static images //Static images
static void render_caps(void) { static void render_caps(void)
static const char PROGMEM my_caps[] = { {
0,128,192,192,248,120, 8, 8, 24, 24, 48, 96, 96,176, 24, 12, 4, 6, 6, 30, 60, 48, 48,240,240, 16, 16, 16, 16, 16, 16, 16, 16, 16,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 16, 16, 16,144,208,208,248,120, 24, 24, 24, 24, 48, 96, 96,176, 24, 12, 4, 6, 6, 30, 60, 48, 48,240,224, 0, 0, 0, 0, 0, 0, 0, static
0, 7, 31, 56, 64,128,128,128,192,192,192,224,192,225,255,240,240,128,128, 64, 64, 48, 24, 7, 7, 6, 4,140,216,120, 48, 0, 0, 0,128,128,128,128,128, 0, 0, 0,240,248, 12, 12, 12, 12, 12, 28, 56, 0, 0,240,248,156, 12, 12, 12, 12,156,248,240, 0, 0,248,252,156, 12, 12, 12, 12,152,240, 0, 0, 32,112,216,140,140,140, 12, 12, 4, 0, 0, 0, 0,128,128,128,128,128, 0, 0, 0, 7, 31, 56, 64,128,128,128,192,192,192,224,192,225,255,240,240,128,128, 64, 64, 48, 24, 7, 7, 6, 4,140,216,120, 48, 0, const char PROGMEM my_caps[] = { 0, 128, 192, 192, 248, 120, 8, 8, 24, 24, 48, 96, 96, 176, 24, 12, 4, 6, 6, 30, 60, 48, 48, 240, 240, 16, 16, 16, 16, 16, 16, 16, 16, 16, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 16, 16, 16, 144, 208, 208, 248, 120, 24, 24, 24, 24, 48, 96, 96, 176, 24, 12, 4, 6, 6, 30, 60, 48, 48, 240, 224, 0, 0, 0, 0, 0, 0, 0,
0,224,240, 24, 4, 3, 1, 0, 0, 0, 0, 6,255,135, 7, 15, 31, 17, 49, 32, 32, 32, 96,224,224, 32, 48, 17, 27, 14, 4, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 15, 31, 48, 48, 48, 48, 48, 56, 28, 0, 0, 63, 63, 3, 1, 1, 1, 1, 3, 63, 63, 0, 0, 63, 63, 3, 3, 3, 3, 3, 1, 0, 0, 0, 16, 48, 48, 49, 49, 49, 27, 14, 4, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0,224,240, 24, 4, 3, 1, 0, 0, 0, 0, 6,255,135, 7, 15, 31, 17, 49, 32, 32, 32, 96,224,224, 32, 48, 17, 27, 14, 4, 0, 0, 7, 31, 56, 64, 128, 128, 128, 192, 192, 192, 224, 192, 225, 255, 240, 240, 128, 128, 64, 64, 48, 24, 7, 7, 6, 4, 140, 216, 120, 48, 0, 0, 0, 128, 128, 128, 128, 128, 0, 0, 0, 240, 248, 12, 12, 12, 12, 12, 28, 56, 0, 0, 240, 248, 156, 12, 12, 12, 12, 156, 248, 240, 0, 0, 248, 252, 156, 12, 12, 12, 12, 152, 240, 0, 0, 32, 112, 216, 140, 140, 140, 12, 12, 4, 0, 0, 0, 0, 128, 128, 128, 128, 128, 0, 0, 0, 7, 31, 56, 64, 128, 128, 128, 192, 192, 192, 224, 192, 225, 255, 240, 240, 128, 128, 64, 64, 48, 24, 7, 7, 6, 4, 140, 216, 120, 48, 0,
0, 3, 7, 6, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96,120,124, 60, 12, 15, 15, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 11, 15, 14, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96,120,124, 60, 12, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 224, 240, 24, 4, 3, 1, 0, 0, 0, 0, 6, 255, 135, 7, 15, 31, 17, 49, 32, 32, 32, 96, 224, 224, 32, 48, 17, 27, 14, 4, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 15, 31, 48, 48, 48, 48, 48, 56, 28, 0, 0, 63, 63, 3, 1, 1, 1, 1, 3, 63, 63, 0, 0, 63, 63, 3, 3, 3, 3, 3, 1, 0, 0, 0, 16, 48, 48, 49, 49, 49, 27, 14, 4, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 224, 240, 24, 4, 3, 1, 0, 0, 0, 0, 6, 255, 135, 7, 15, 31, 17, 49, 32, 32, 32, 96, 224, 224, 32, 48, 17, 27, 14, 4, 0,
}; 0, 3, 7, 6, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96, 120, 124, 60, 12, 15, 15, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 11, 15, 14, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96, 120, 124, 60, 12, 15, 7, 0, 0, 0, 0, 0, 0, 0,
oled_write_raw_P(my_caps, sizeof(my_caps)); };
oled_write_raw_P(my_caps, sizeof(my_caps));
} }
static void render_logo(void) { static void render_logo(void)
static const char PROGMEM my_logo[] = { {
0,128,192,192,248,120, 8, 8, 24, 24, 48, 96, 96,176, 24, 12, 4, 6, 6, 30, 60, 48, 48,240,240, 16, 16, 16, 16, 16, 16, 16, 16, 16,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 16, 16, 16,144,208,208,248,120, 24, 24, 24, 24, 48, 96, 96,176, 24, 12, 4, 6, 6, 30, 60, 48, 48,240,224, 0, 0, 0, 0, 0, 0, 0, static
0, 7, 31, 56, 64,128,128,128,192,192,192,224,192,225,255,240,240,128,128, 64, 64, 48, 24, 7, 7, 6, 4,140,216,120, 48, 0, 48,120,204,204,204,204,204,140, 8, 0, 0,240,248, 12, 12, 12, 12, 12,248,240, 0, 0,248,252, 24, 48, 96, 96, 48, 24,252,248, 0, 0,248,252,140,140,140, 12, 8, 0, 0,252,252, 0, 0, 8, 12, 12, 12, 12,252,248, 0, 0,240,248, 12, 12,140, 76,248,240, 0, 7, 31, 56, 64,128,128,128,192,192,192,224,192,225,255,240,240,128,128, 64, 64, 48, 24, 7, 7, 6, 4,140,216,120, 48, 0, const char PROGMEM my_logo[] = { 0, 128, 192, 192, 248, 120, 8, 8, 24, 24, 48, 96, 96, 176, 24, 12, 4, 6, 6, 30, 60, 48, 48, 240, 240, 16, 16, 16, 16, 16, 16, 16, 16, 16, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 16, 16, 16, 144, 208, 208, 248, 120, 24, 24, 24, 24, 48, 96, 96, 176, 24, 12, 4, 6, 6, 30, 60, 48, 48, 240, 224, 0, 0, 0, 0, 0, 0, 0,
0,224,240, 24, 4, 3, 1, 0, 0, 0, 0, 6,255,135, 7, 15, 31, 17, 49, 32, 32, 32, 96,224,224, 32, 48, 17, 27, 14, 4, 0, 16, 48, 48, 48, 48, 48, 48, 63, 15, 0, 0, 15, 31, 48, 48, 48, 48, 48, 31, 15, 0, 0, 63, 31, 0, 0, 0, 0, 0, 0, 31, 63, 0, 0, 31, 63, 49, 49, 49, 48, 16, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 63, 63, 0, 0, 15, 31, 50, 49, 48, 48, 31, 15, 0,224,240, 24, 4, 3, 1, 0, 0, 0, 0, 6,255,135, 7, 15, 31, 17, 49, 32, 32, 32, 96,224,224, 32, 48, 17, 27, 14, 4, 0, 0, 7, 31, 56, 64, 128, 128, 128, 192, 192, 192, 224, 192, 225, 255, 240, 240, 128, 128, 64, 64, 48, 24, 7, 7, 6, 4, 140, 216, 120, 48, 0, 48, 120, 204, 204, 204, 204, 204, 140, 8, 0, 0, 240, 248, 12, 12, 12, 12, 12, 248, 240, 0, 0, 248, 252, 24, 48, 96, 96, 48, 24, 252, 248, 0, 0, 248, 252, 140, 140, 140, 12, 8, 0, 0, 252, 252, 0, 0, 8, 12, 12, 12, 12, 252, 248, 0, 0, 240, 248, 12, 12, 140, 76, 248, 240, 0, 7, 31, 56, 64, 128, 128, 128, 192, 192, 192, 224, 192, 225, 255, 240, 240, 128, 128, 64, 64, 48, 24, 7, 7, 6, 4, 140, 216, 120, 48, 0,
0, 3, 7, 6, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96,120,124, 60, 12, 15, 15, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 11, 15, 14, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96,120,124, 60, 12, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 224, 240, 24, 4, 3, 1, 0, 0, 0, 0, 6, 255, 135, 7, 15, 31, 17, 49, 32, 32, 32, 96, 224, 224, 32, 48, 17, 27, 14, 4, 0, 16, 48, 48, 48, 48, 48, 48, 63, 15, 0, 0, 15, 31, 48, 48, 48, 48, 48, 31, 15, 0, 0, 63, 31, 0, 0, 0, 0, 0, 0, 31, 63, 0, 0, 31, 63, 49, 49, 49, 48, 16, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 63, 63, 0, 0, 15, 31, 50, 49, 48, 48, 31, 15, 0, 224, 240, 24, 4, 3, 1, 0, 0, 0, 0, 6, 255, 135, 7, 15, 31, 17, 49, 32, 32, 32, 96, 224, 224, 32, 48, 17, 27, 14, 4, 0,
}; 0, 3, 7, 6, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96, 120, 124, 60, 12, 15, 15, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 11, 15, 14, 30, 60, 48, 32, 48, 48, 24, 12, 7, 7, 12, 16, 32, 96, 96, 120, 124, 60, 12, 15, 7, 0, 0, 0, 0, 0, 0, 0,
oled_write_raw_P(my_logo, sizeof(my_logo));} };
oled_write_raw_P(my_logo, sizeof(my_logo));
}
//Render chosen display //Render chosen display
void render_oled_display(void) { void render_oled_display(void)
if (oled_mode == 0) { {
if (host_keyboard_led_state().caps_lock) { if (oled_mode == 0)
render_caps(); {
} else { if (host_keyboard_led_state().caps_lock)
render_logo(); {
} render_caps();
} else if (oled_mode == 1) { }
render_stats(); else
} {
render_logo();
}
}
else if (oled_mode == 1)
{
render_stats();
}
} }
//Rotate 180 degrees //Rotate 180 degrees
oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_user(oled_rotation_t rotation)
return OLED_ROTATION_180; {
} return OLED_ROTATION_180;
}
bool oled_task_user(void) { bool oled_task_user(void)
render_oled_display(); {
return false; render_oled_display();
return false;
} }
#endif #endif
//Record keypress //Record keypress
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record)
switch (keycode) { {
case KC_ESC: switch (keycode)
if (record->event.pressed) { {
if (timer_elapsed(esc_timer) > 250) { case KC_ESC:
esc_press_count = 0; if (record->event.pressed)
} {
esc_press_count++; if (timer_elapsed(esc_timer) > 250)
esc_timer = timer_read(); {
esc_press_count = 0;
}
if (esc_press_count == 3) { esc_press_count++;
oled_clear(); esc_timer = timer_read();
oled_mode = (oled_mode == 0) ? 1 : 0;
esc_press_count = 0; if (esc_press_count == 3)
} {
} oled_clear();
break; oled_mode = (oled_mode == 0) ? 1 : 0;
} esc_press_count = 0;
return true; }
}
break;
}
return true;
} }

View File

@ -1,3 +1,2 @@
VIA_ENABLE = yes
OLED_ENABLE = yes OLED_ENABLE = yes
OLED_DRIVER = ssd1306 OLED_DRIVER = ssd1306

View File

@ -1 +0,0 @@
# This file intentionally left blank