add Lestmovoz firmware (#728)

* add lestmovoz

* vial uid

* lestmovoz compiles

* cannot get these LEDs to work

* oops added conf

* working leds

---------

Co-authored-by: avshockeyw <avshockeyw@users.noreply.github.com>
This commit is contained in:
josh-l-wang 2024-05-12 20:47:28 -04:00 committed by GitHub
parent 63e10d6cdc
commit cb47e1706a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 360 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#pragma once
#define HAL_USE_PWM TRUE
#include_next <halconf.h>

View File

@ -0,0 +1,85 @@
{
"keyboard_name": "leSTMovoz",
"manufacturer": "calvin-mcd",
"url": "https://github.com/calvin-mcd/LeSTMovoz",
"maintainer": "jlw",
"usb": {
"vid": "0x1209",
"pid": "0xA459",
"device_version": "0.0.1"
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["B7", "B6", "B5", "B4", "B3", "B0", "C5", "C4", "A7", "A6"],
"rows": ["C13", "C14", "A1", "A0"]
},
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "Q", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "W", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "E", "matrix": [0, 2], "x": 2, "y": 0},
{"label": "R", "matrix": [0, 3], "x": 3, "y": 0},
{"label": "T", "matrix": [0, 4], "x": 4, "y": 0},
{"label": "Y", "matrix": [0, 5], "x": 5, "y": 0},
{"label": "U", "matrix": [0, 6], "x": 6, "y": 0},
{"label": "I", "matrix": [0, 7], "x": 7, "y": 0},
{"label": "O", "matrix": [0, 8], "x": 8, "y": 0},
{"label": "P", "matrix": [0, 9], "x": 9, "y": 0},
{"label": "A", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "S", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "D", "matrix": [1, 2], "x": 2, "y": 1},
{"label": "F", "matrix": [1, 3], "x": 3, "y": 1},
{"label": "G", "matrix": [1, 4], "x": 4, "y": 1},
{"label": "H", "matrix": [1, 5], "x": 5, "y": 1},
{"label": "J", "matrix": [1, 6], "x": 6, "y": 1},
{"label": "K", "matrix": [1, 7], "x": 7, "y": 1},
{"label": "L", "matrix": [1, 8], "x": 8, "y": 1},
{"label": "Enter", "matrix": [1, 9], "x": 9, "y": 1},
{"label": "Z", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "X", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "C", "matrix": [2, 2], "x": 2, "y": 2},
{"label": "V", "matrix": [2, 3], "x": 3, "y": 2},
{"label": "B", "matrix": [2, 4], "x": 4, "y": 2},
{"label": "N", "matrix": [2, 5], "x": 5, "y": 2},
{"label": "M", "matrix": [2, 6], "x": 6, "y": 2},
{"label": ",", "matrix": [2, 7], "x": 7, "y": 2},
{"label": ".", "matrix": [2, 8], "x": 8, "y": 2},
{"label": "/", "matrix": [2, 9], "x": 9, "y": 2},
{"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "Alt", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Fn", "matrix": [3, 2], "x": 2, "y": 3},
{"label": "Fn2", "matrix": [3, 3], "x": 3, "y": 3},
{"label": "Backspace", "matrix": [3, 4], "x": 4, "y": 3},
{"label": "Space", "matrix": [3, 5], "x": 5, "y": 3},
{"label": "Space", "matrix": [3, 6], "x": 6, "y": 3},
{"label": "Ctrl", "matrix": [3, 7], "x": 7, "y": 3},
{"label": "Ctrl", "matrix": [3, 8], "x": 8, "y": 3},
{"label": "Fn2", "matrix": [3, 9], "x": 9, "y": 3},
]
}
},
"rgb_matrix": {
"layout": [
{"matrix": [0, 4], "x": 132, "y": 16, "flags": 8},
{"matrix": [0, 5], "x": 172, "y": 16, "flags": 8},
],
"driver": "ws2812"
},
"ws2812": {
"pin": "A8",
"driver": "pwm"
}
}

View File

@ -0,0 +1,40 @@
// Copyright 2023 sporkus
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#define HM_A LSFT_T(KC_A)
#define HM_S LALT_T(KC_S)
#define HM_D LGUI_T(KC_D)
#define HM_F LCTL_T(KC_F)
#define HM_J RCTL_T(KC_J)
#define HM_K RGUI_T(KC_K)
#define HM_L RALT_T(KC_L)
#define HM_Z LSFT_T(KC_Z)
#define HM_SLSH LSFT_T(KC_SLSH)
#define HM_QUOT RSFT_T(KC_QUOT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
MO(1), KC_ENT, MO(2), KC_BSPC, _______, _______, _______, _______, _______, _______
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_0,
_______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______,
_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_LEFT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

View File

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

View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#define VIAL_KEYBOARD_UID {0x92, 0xC4, 0xA5, 0xA6, 0x78, 0xBC, 0x8C, 0x30}
#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 1 }
#define VIAL_COMBO_ENTRIES 69
#define DYNAMIC_KEYMAP_LAYER_COUNT 8

View File

@ -0,0 +1,93 @@
// Copyright 2023 sporkus
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#define HM_A LSFT_T(KC_A)
#define HM_S LALT_T(KC_S)
#define HM_D LGUI_T(KC_D)
#define HM_F LCTL_T(KC_F)
#define HM_J RCTL_T(KC_J)
#define HM_K RGUI_T(KC_K)
#define HM_L RALT_T(KC_L)
#define HM_Z LSFT_T(KC_Z)
#define HM_SLSH LSFT_T(KC_SLSH)
#define HM_QUOT RSFT_T(KC_QUOT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
MO(1), KC_ENT, MO(2), KC_BSPC, _______, _______, _______, _______, _______, _______
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_0,
_______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______,
_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_LEFT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
#ifdef RGB_MATRIX_ENABLE
#define RGB_LAYER_INDICATOR_ENABLE
#define RGB_MODS_INDICATOR_ENABLE
#define RGB_INDICATOR_BRIGHTNESS 69
#define LED_RIGHT 1
#define LED_LEFT 0
#define LAYER_R layer_colors[layer][0] * RGB_INDICATOR_BRIGHTNESS / 255
#define LAYER_G layer_colors[layer][1] * RGB_INDICATOR_BRIGHTNESS / 255
#define LAYER_B layer_colors[layer][2] * RGB_INDICATOR_BRIGHTNESS / 255
#define MODS_ACTIVE(mods) ((get_mods()|get_oneshot_mods()) & MOD_MASK_##mods ? RGB_INDICATOR_BRIGHTNESS:0)
#define SHIFT_ACTIVE (get_mods() & MOD_MASK_SHIFT ? RGB_INDICATOR_BRIGHTNESS/4:0)
#define MODS_R MODS_ACTIVE(CTRL) + SHIFT_ACTIVE
#define MODS_G MODS_ACTIVE(GUI) + SHIFT_ACTIVE
#define MODS_B MODS_ACTIVE(ALT) + SHIFT_ACTIVE
const uint8_t PROGMEM layer_colors[][3] = {
{RGB_OFF},
{RGB_RED},
{RGB_GREEN},
{RGB_BLUE},
{RGB_YELLOW},
{RGB_PURPLE},
{RGB_PINK},
{RGB_TEAL}
};
void set_rgb_matrix_indicators(uint8_t led_min, uint8_t led_max) {
#if defined(RGB_LAYER_INDICATOR_ENABLE)
int layer = get_highest_layer(layer_state|default_layer_state);
RGB_MATRIX_INDICATOR_SET_COLOR(LED_RIGHT, LAYER_R, LAYER_G, LAYER_B);
/* uprintf("layer RGB: (%u, %u, %u)\n", LAYER_R, LAYER_G, LAYER_B); */
#else
RGB_MATRIX_INDICATOR_SET_COLOR(LED_RIGHT, 0, 0, 0);
#endif
#if defined(RGB_MODS_INDICATOR_ENABLE)
RGB_MATRIX_INDICATOR_SET_COLOR(LED_LEFT, MODS_R, MODS_G, MODS_B);
/* uprintf("mod RGB: (%u, %u, %u)\n", MODS_R, MODS_G, MODS_B); */
#else
RGB_MATRIX_INDICATOR_SET_COLOR(LED_LEFT, 0, 0, 0);
#endif
}
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
set_rgb_matrix_indicators(led_min, led_max);
return false;
}
#endif

View File

@ -0,0 +1,3 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
VIALRGB_ENABLE = yes

View File

@ -0,0 +1,104 @@
{
"lighting": "vialrgb",
"matrix": {
"rows": 4,
"cols": 10
},
"layouts": {
"labels":[
["Left Space Options", "Ortho", "3u", "2u"],
["Right Space Options", "Ortho", "3u", "2u"]
],
"keymap":
[
[
"0,0",
"0,1",
"0,2",
"0,3",
"0,4",
{
"x": 1
},
"0,5",
"0,6",
"0,7",
"0,8",
"0,9"
],
[
"1,0",
"1,1",
"1,2",
"1,3",
"1,4",
{
"x": 1
},
"1,5",
"1,6",
"1,7",
"1,8",
"1,9"
],
[
"2,0",
"2,1",
"2,2",
"2,3",
"2,4",
{
"x": 1
},
"2,5",
"2,6",
"2,7",
"2,8",
"2,9"
],
[
"3,0",
"3,1",
"3,2\n\n\n0,0",
"3,3\n\n\n0,0",
"3,4\n\n\n0,0",
{
"x": 1
},
"3,5\n\n\n1,0",
"3,6\n\n\n1,0",
"3,7\n\n\n1,0",
"3,8",
"3,9"
],
[
{
"y": 0.25,
"x": 2,
"w": 3
},
"3,3\n\n\n0,1",
{
"x": 1,
"w": 3
},
"3,6\n\n\n1,1"
],
[
{
"x": 2
},
"3,2\n\n\n0,2",
{
"w": 2
},
"3,4\n\n\n0,2",
{
"x": 1,
"w": 2
},
"3,5\n\n\n1,2",
"3,7\n\n\n1,2"
]
]
}}

View File

@ -0,0 +1,15 @@
#pragma once
#include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM1
#define STM32_PWM_USE_TIM1 TRUE
#define WS2812_PWM_DRIVER PWMD1
#define WS2812_PWM_CHANNEL 1
#define WS2812_PWM_PAL_MODE 2
#define WS2812_DMA_STREAM STM32_DMA1_STREAM5
#define WS2812_DMA_CHANNEL 5
#undef WS2812_BYTE_ORDER
#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB

View File

@ -0,0 +1,3 @@
# This is the firmware for leSTMovoz
https://github.com/calvin-mcd/LeSTMovoz

View File

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