1
0
Fork 0
forked from forks/qmk_firmware

refactor: mechwild/bbs (#23373)

This commit is contained in:
Less/Rikki 2024-05-04 21:36:08 -04:00 committed by GitHub
parent 5f9917856a
commit 5c90facf93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 69 additions and 70 deletions

View file

@ -3,23 +3,6 @@
#pragma once #pragma once
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define WS2812_PWM_DRIVER PWMD4
#define LOCKING_SUPPORT_ENABLE #define WS2812_PWM_CHANNEL 4
/* Locking resynchronize hack */ #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6
#define LOCKING_RESYNC_ENABLE
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT

View file

@ -0,0 +1,8 @@
// Copyright 2024 QMK Contributors (@qmk)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define HAL_USE_PWM TRUE
#include_next <halconf.h>

View file

@ -1,29 +1,60 @@
{ {
"keyboard_name": "BB Steno",
"manufacturer": "MechWild", "manufacturer": "MechWild",
"keyboard_name": "BB Steno",
"maintainer": "kylemccreery", "maintainer": "kylemccreery",
"url": "https://mechwild.com/product/bb-steno/", "bootloader_instructions": "Hold down the BOOT button, then tap the NRST button on the BlackPill. Avoid touching the A11 and A12 pins.",
"usb": { "development_board": "blackpill_f401",
"vid": "0x6D77",
"pid": "0x170E",
"device_version": "0.0.1",
"force_nkro": true
},
"matrix_pins": {
"cols": ["B0", "A7", "A6", "A5", "A4", "A3"],
"rows": ["B12", "B10", "B13", "B1", "B14"]
},
"diode_direction": "COL2ROW", "diode_direction": "COL2ROW",
"dip_switch": { "dip_switch": {
"pins": ["A0"] "pins": ["A0"]
}, },
"features": {
"bootmagic": true,
"dip_switch": true,
"nkro": true,
"rgblight": true,
"steno": true
},
"indicators": { "indicators": {
"caps_lock": "C13", "caps_lock": "C13",
"on_state": 0 "on_state": 0
}, },
"processor": "STM32F401", "matrix_pins": {
"bootloader": "stm32-dfu", "cols": ["B0", "A7", "A6", "A5", "A4", "A3"],
"board": "BLACKPILL_STM32_F401", "rows": ["B12", "B10", "B13", "B1", "B14"]
},
"rgblight": {
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
},
"brightness_steps": 8,
"led_count": 6,
"saturation_steps": 8,
"sleep": true
},
"url": "https://mechwild.com/product/bb-steno/",
"usb": {
"device_version": "1.1.0",
"force_nkro": true,
"pid": "0x170E",
"shared_endpoint": {
"keyboard": true
},
"vid": "0x6D77"
},
"ws2812": {
"driver": "pwm",
"pin": "B9"
},
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"layout": [ "layout": [
@ -33,32 +64,27 @@
{"matrix": [0, 3], "x": 3, "y": 0}, {"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0.125}, {"matrix": [0, 4], "x": 4, "y": 0.125},
{"matrix": [0, 5], "x": 5, "y": 0.125}, {"matrix": [0, 5], "x": 5, "y": 0.125},
{"matrix": [1, 0], "x": 6.75, "y": 0.125}, {"matrix": [1, 0], "x": 6.75, "y": 0.125},
{"matrix": [1, 1], "x": 7.75, "y": 0.125}, {"matrix": [1, 1], "x": 7.75, "y": 0.125},
{"matrix": [1, 2], "x": 8.75, "y": 0}, {"matrix": [1, 2], "x": 8.75, "y": 0},
{"matrix": [1, 3], "x": 9.75, "y": 0.125}, {"matrix": [1, 3], "x": 9.75, "y": 0.125},
{"matrix": [1, 4], "x": 10.75, "y": 0.375}, {"matrix": [1, 4], "x": 10.75, "y": 0.375},
{"matrix": [1, 5], "x": 11.75, "y": 0.375}, {"matrix": [1, 5], "x": 11.75, "y": 0.375},
{"matrix": [2, 0], "x": 0, "y": 1.375}, {"matrix": [2, 0], "x": 0, "y": 1.375},
{"matrix": [2, 1], "x": 1, "y": 1.375}, {"matrix": [2, 1], "x": 1, "y": 1.375},
{"matrix": [2, 2], "x": 2, "y": 1.125}, {"matrix": [2, 2], "x": 2, "y": 1.125},
{"matrix": [2, 3], "x": 3, "y": 1}, {"matrix": [2, 3], "x": 3, "y": 1},
{"matrix": [2, 4], "x": 4, "y": 1.125}, {"matrix": [2, 4], "x": 4, "y": 1.125},
{"matrix": [2, 5], "x": 5, "y": 1.125}, {"matrix": [2, 5], "x": 5, "y": 1.125},
{"matrix": [3, 0], "x": 6.75, "y": 1.125}, {"matrix": [3, 0], "x": 6.75, "y": 1.125},
{"matrix": [3, 1], "x": 7.75, "y": 1.125}, {"matrix": [3, 1], "x": 7.75, "y": 1.125},
{"matrix": [3, 2], "x": 8.75, "y": 1}, {"matrix": [3, 2], "x": 8.75, "y": 1},
{"matrix": [3, 3], "x": 9.75, "y": 1.125}, {"matrix": [3, 3], "x": 9.75, "y": 1.125},
{"matrix": [3, 4], "x": 10.75, "y": 1.375}, {"matrix": [3, 4], "x": 10.75, "y": 1.375},
{"matrix": [3, 5], "x": 11.75, "y": 1.375}, {"matrix": [3, 5], "x": 11.75, "y": 1.375},
{"matrix": [4, 3], "x": 2.75, "y": 3.125, "h": 1.5}, {"matrix": [4, 3], "x": 2.75, "y": 3.125, "h": 1.5},
{"matrix": [4, 4], "x": 3.75, "y": 3.125, "h": 1.5}, {"matrix": [4, 4], "x": 3.75, "y": 3.125, "h": 1.5},
{"matrix": [4, 5], "x": 4.75, "y": 2.875, "h": 1.5}, {"matrix": [4, 5], "x": 4.75, "y": 2.875, "h": 1.5},
{"matrix": [4, 0], "x": 7, "y": 2.875, "h": 1.5}, {"matrix": [4, 0], "x": 7, "y": 2.875, "h": 1.5},
{"matrix": [4, 1], "x": 8, "y": 3.125, "h": 1.5}, {"matrix": [4, 1], "x": 8, "y": 3.125, "h": 1.5},
{"matrix": [4, 2], "x": 9, "y": 3.125, "h": 1.5} {"matrix": [4, 2], "x": 9, "y": 3.125, "h": 1.5}

View file

@ -3,22 +3,11 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN1
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */ /* Base */
[_BASE] = LAYOUT( [0] = LAYOUT(
STN_RES1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, STN_RES1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
STN_RES2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, STN_RES2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
STN_A, STN_O, STN_N1, STN_N2, STN_E, STN_U STN_A, STN_O, STN_N1, STN_N2, STN_E, STN_U
),
[_FN1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
) )
}; };

View file

@ -0,0 +1,9 @@
// Copyright 2024 QMK Contributors (@qmk)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM4
#define STM32_PWM_USE_TIM4 TRUE

View file

@ -5,7 +5,8 @@
A bare-bones stenography keyboard. No bells or whistles. Simple, cheap, effective, steno. A bare-bones stenography keyboard. No bells or whistles. Simple, cheap, effective, steno.
* Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery) * Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery)
* Hardware Supported: BBS v0.1 * Hardware Supported: BBS v0.1, v1.1
* v0.1 PCBs were miswired for WS2812 RGB LED strips. As the data pin is the same, a strip could still be added with some handwiring.
* Hardware Availability: [BBS on MechWild](https://mechwild.com/product/bb-steno/) * Hardware Availability: [BBS on MechWild](https://mechwild.com/product/bb-steno/)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):

View file

@ -1,17 +0,0 @@
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = no # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes # Dip Switch Enabled
# Necessary for stenography functionality
STENO_ENABLE = yes # Enable stenography endpoint
NKRO_ENABLE = yes # Enable N-Key Rollover
KEYBOARD_SHARED_EP = yes # Needed to free up an endpoint in blackpill