Refactor bastardkb/tbkmini (#25438)

This commit is contained in:
jack 2025-07-06 00:50:37 -06:00 committed by GitHub
parent 584ad807cc
commit 0842f54a27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 172 additions and 644 deletions

View File

@ -68,6 +68,18 @@
"bakeneko80": { "bakeneko80": {
"target": "kkatano/bakeneko80" "target": "kkatano/bakeneko80"
}, },
"bastardkb/tbkmini/v2/elitec": {
"target": "bastardkb/tbkmini/promicro"
},
"bastardkb/tbkmini/v2/splinky_2": {
"target": "bastardkb/tbkmini/promicro"
},
"bastardkb/tbkmini/v2/splinky_3": {
"target": "bastardkb/tbkmini/promicro"
},
"bastardkb/tbkmini/v2/stemcell": {
"target": "bastardkb/tbkmini/promicro"
},
"bear_face": { "bear_face": {
"target": "bear_face/v1" "target": "bear_face/v1"
}, },

View File

@ -0,0 +1,19 @@
# Information for Various BastardKB Hardware
## Handedness Pin on Elite-C Holder
The [Elite-C Holder](https://github.com/Bastardkb/Elite-C-holder) supports setting [handedness by pin](https://docs.qmk.fm/features/split_keyboard#handedness-by-pin) on pin F1 of an Elite-C.
To utilise this, you must be using an Elite-C compatible development board (with the bottom 5 pins broken out) and install the necessary resistor. The following firmware configuration can be made in your keymap directory:
```Makefile
# rules.mk
PIN_COMPATIBLE = elite_c
```
```c
// config.h
#pragma once
#define SPLIT_HAND_PIN F1
#define SPLIT_HAND_PIN_LOW_IS_LEFT
```

View File

@ -1,27 +1,9 @@
/* // Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) // Copyright 2021 Stefan Kerkmann (@KarlK90)
* Copyright 2021 Stefan Kerkmann (@KarlK90) // Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) // SPDX-License-Identifier: GPL-2.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publicw License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once #pragma once
/* Handedness. */
#define SPLIT_HAND_PIN A3 // High -> left, Low -> right.
/* RGB settings. */ /* RGB settings. */
#define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_DRIVER PWMD2
#define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_CHANNEL 2
@ -30,13 +12,6 @@
#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1
#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_DMA_CHANNEL 3
/* Serial configuration for split keyboard. */
#define SERIAL_USART_TX_PIN A9
/* CRC. */
#define CRC8_USE_TABLE
#define CRC8_OPTIMIZE_SPEED
/* SPI config for EEPROM. */ /* SPI config for EEPROM. */
#define SPI_DRIVER SPID1 #define SPI_DRIVER SPID1
#define SPI_SCK_PIN A5 #define SPI_SCK_PIN A5

View File

@ -1,21 +1,6 @@
/** // Copyright 2020 Nick Brassel (tzarc)
* Copyright 2020 Nick Brassel (tzarc) // Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) // SPDX-License-Identifier: GPL-2.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once #pragma once
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE

View File

@ -1,37 +1,23 @@
{ {
"keyboard_name": "TBK Mini Blackpill", "development_board": "blackpill_f411",
"usb": {
"device_version": "1.0.0",
"shared_endpoint": {
"keyboard": true
}
},
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"rgb_matrix": true
},
"eeprom": { "eeprom": {
"driver": "spi" "driver": "spi"
}, },
"split": {
"enabled": true
},
"rgb_matrix": {
"driver": "ws2812"
},
"ws2812": {
"pin": "A1",
"driver": "pwm"
},
"build": {
"debounce_type": "asym_eager_defer_pk"
},
"matrix_pins": { "matrix_pins": {
"cols": ["B0", "B1", "B10", "B3", "B4", "B5"], "cols": ["B0", "B1", "B10", "B3", "B4", "B5"],
"rows": ["A2", "B8", "A8", "B9"] "rows": ["A2", "B8", "A8", "B9"]
}, },
"diode_direction": "ROW2COL", "split": {
"development_board": "blackpill_f411" "handedness": {
"pin": "A3"
},
"serial": {
"driver": "usart",
"pin": "A9"
}
},
"ws2812": {
"driver": "pwm",
"pin": "A1"
}
} }

View File

@ -1,22 +1,7 @@
/* // Copyright 2020 Nick Brassel (tzarc)
* Copyright 2020 Nick Brassel (tzarc) // Copyright 2021 Stefan Kerkmann (@KarlK90)
* Copyright 2021 Stefan Kerkmann (@KarlK90) // Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) // SPDX-License-Identifier: GPL-2.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once #pragma once
#include_next <mcuconf.h> #include_next <mcuconf.h>

View File

@ -1,5 +0,0 @@
AUDIO_SUPPORTED = no # Audio is not supported
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
SERIAL_DRIVER = usart

View File

@ -1,24 +1,70 @@
{ {
"url": "https://www.bastardkb.com/tbk-mini", "url": "https://github.com/Bastardkb/TBK-Mini",
"keyboard_name": "TBK Mini",
"usb": { "usb": {
"pid": "0x1828" "pid": "0x1828",
"device_version": "2.0.0"
}, },
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"rgb_matrix": true
},
"split": {
"enabled": true
},
"diode_direction": "ROW2COL",
"rgb_matrix": { "rgb_matrix": {
"driver": "ws2812",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 2},
{"matrix": [1, 0], "x": 0, "y": 21, "flags": 2},
{"matrix": [2, 0], "x": 0, "y": 42, "flags": 2},
{"matrix": [2, 1], "x": 20, "y": 42, "flags": 4},
{"matrix": [1, 1], "x": 20, "y": 21, "flags": 4},
{"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 41, "y": 0, "flags": 4},
{"matrix": [1, 2], "x": 41, "y": 21, "flags": 4},
{"matrix": [2, 2], "x": 41, "y": 42, "flags": 4},
{"matrix": [2, 3], "x": 61, "y": 42, "flags": 4},
{"matrix": [1, 3], "x": 61, "y": 21, "flags": 4},
{"matrix": [0, 3], "x": 61, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 81, "y": 0, "flags": 4},
{"matrix": [1, 4], "x": 81, "y": 21, "flags": 4},
{"matrix": [2, 4], "x": 81, "y": 42, "flags": 4},
{"matrix": [0, 5], "x": 102, "y": 0, "flags": 4},
{"matrix": [1, 5], "x": 102, "y": 21, "flags": 4},
{"matrix": [2, 5], "x": 102, "y": 42, "flags": 4},
{"matrix": [3, 1], "x": 61, "y": 64, "flags": 2},
{"matrix": [3, 3], "x": 81, "y": 64, "flags": 2},
{"matrix": [3, 4], "x": 102, "y": 64, "flags": 2},
{"matrix": [4, 0], "x": 224, "y": 0, "flags": 2},
{"matrix": [5, 0], "x": 224, "y": 21, "flags": 2},
{"matrix": [6, 0], "x": 224, "y": 42, "flags": 2},
{"matrix": [6, 1], "x": 204, "y": 42, "flags": 4},
{"matrix": [5, 1], "x": 204, "y": 21, "flags": 4},
{"matrix": [4, 1], "x": 204, "y": 0, "flags": 4},
{"matrix": [4, 2], "x": 183, "y": 0, "flags": 4},
{"matrix": [5, 2], "x": 183, "y": 21, "flags": 4},
{"matrix": [6, 2], "x": 183, "y": 42, "flags": 4},
{"matrix": [6, 3], "x": 163, "y": 42, "flags": 4},
{"matrix": [5, 3], "x": 163, "y": 21, "flags": 4},
{"matrix": [4, 3], "x": 163, "y": 0, "flags": 4},
{"matrix": [4, 4], "x": 142, "y": 0, "flags": 4},
{"matrix": [5, 4], "x": 142, "y": 21, "flags": 4},
{"matrix": [6, 4], "x": 142, "y": 42, "flags": 4},
{"matrix": [4, 5], "x": 122, "y": 0, "flags": 4},
{"matrix": [5, 5], "x": 122, "y": 21, "flags": 4},
{"matrix": [6, 5], "x": 122, "y": 42, "flags": 4},
{"matrix": [7, 1], "x": 163, "y": 64, "flags": 2},
{"matrix": [7, 3], "x": 142, "y": 64, "flags": 2},
{"matrix": [7, 4], "x": 122, "y": 64, "flags": 2}
],
"max_brightness": 50, "max_brightness": 50,
"sleep": true, "sleep": true,
"split_count": [21, 21] "split_count": [21, 21]
}, },
"rgblight": {
"led_count": 42,
"split_count": [21, 21]
},
"split": {
"transport": {
"sync": {
"matrix_state": true
}
}
},
"community_layouts": ["split_3x6_3"], "community_layouts": ["split_3x6_3"],
"layouts": { "layouts": {
"LAYOUT_split_3x6_3": { "LAYOUT_split_3x6_3": {
@ -29,46 +75,39 @@
{"matrix": [0, 3], "x": 3, "y": 0}, {"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0}, {"matrix": [0, 4], "x": 4, "y": 0},
{"matrix": [0, 5], "x": 5, "y": 0}, {"matrix": [0, 5], "x": 5, "y": 0},
{"matrix": [4, 5], "x": 11, "y": 0}, {"matrix": [4, 5], "x": 11, "y": 0},
{"matrix": [4, 4], "x": 12, "y": 0}, {"matrix": [4, 4], "x": 12, "y": 0},
{"matrix": [4, 3], "x": 13, "y": 0}, {"matrix": [4, 3], "x": 13, "y": 0},
{"matrix": [4, 2], "x": 14, "y": 0}, {"matrix": [4, 2], "x": 14, "y": 0},
{"matrix": [4, 1], "x": 15, "y": 0}, {"matrix": [4, 1], "x": 15, "y": 0},
{"matrix": [4, 0], "x": 16, "y": 0}, {"matrix": [4, 0], "x": 16, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1}, {"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1}, {"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1}, {"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1}, {"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [1, 4], "x": 4, "y": 1}, {"matrix": [1, 4], "x": 4, "y": 1},
{"matrix": [1, 5], "x": 5, "y": 1}, {"matrix": [1, 5], "x": 5, "y": 1},
{"matrix": [5, 5], "x": 11, "y": 1}, {"matrix": [5, 5], "x": 11, "y": 1},
{"matrix": [5, 4], "x": 12, "y": 1}, {"matrix": [5, 4], "x": 12, "y": 1},
{"matrix": [5, 3], "x": 13, "y": 1}, {"matrix": [5, 3], "x": 13, "y": 1},
{"matrix": [5, 2], "x": 14, "y": 1}, {"matrix": [5, 2], "x": 14, "y": 1},
{"matrix": [5, 1], "x": 15, "y": 1}, {"matrix": [5, 1], "x": 15, "y": 1},
{"matrix": [5, 0], "x": 16, "y": 1}, {"matrix": [5, 0], "x": 16, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2}, {"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2}, {"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2, "y": 2}, {"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2}, {"matrix": [2, 3], "x": 3, "y": 2},
{"matrix": [2, 4], "x": 4, "y": 2}, {"matrix": [2, 4], "x": 4, "y": 2},
{"matrix": [2, 5], "x": 5, "y": 2}, {"matrix": [2, 5], "x": 5, "y": 2},
{"matrix": [6, 5], "x": 11, "y": 2}, {"matrix": [6, 5], "x": 11, "y": 2},
{"matrix": [6, 4], "x": 12, "y": 2}, {"matrix": [6, 4], "x": 12, "y": 2},
{"matrix": [6, 3], "x": 13, "y": 2}, {"matrix": [6, 3], "x": 13, "y": 2},
{"matrix": [6, 2], "x": 14, "y": 2}, {"matrix": [6, 2], "x": 14, "y": 2},
{"matrix": [6, 1], "x": 15, "y": 2}, {"matrix": [6, 1], "x": 15, "y": 2},
{"matrix": [6, 0], "x": 16, "y": 2}, {"matrix": [6, 0], "x": 16, "y": 2},
{"matrix": [3, 3], "x": 5, "y": 3}, {"matrix": [3, 3], "x": 5, "y": 3},
{"matrix": [3, 4], "x": 6, "y": 3}, {"matrix": [3, 4], "x": 6, "y": 3},
{"matrix": [3, 1], "x": 7, "y": 3}, {"matrix": [3, 1], "x": 7, "y": 3},
{"matrix": [7, 1], "x": 9, "y": 3}, {"matrix": [7, 1], "x": 9, "y": 3},
{"matrix": [7, 4], "x": 10, "y": 3}, {"matrix": [7, 4], "x": 10, "y": 3},
{"matrix": [7, 3], "x": 11, "y": 3} {"matrix": [7, 3], "x": 11, "y": 3}

View File

@ -1,69 +0,0 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, MO(1), MO(2), KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[1] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, _______, MO(3), KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[2] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, MO(3), _______, KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[3] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RM_NEXT, RM_HUED, RM_SATD, RM_VALD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, _______, _______, KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
)};

View File

@ -0,0 +1,25 @@
{
"keyboard": "bastardkb/tbkmini",
"keymap": "default",
"layout": "LAYOUT_split_3x6_3",
"layers": [
[
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC",
"KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT",
"KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC",
"KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT"
],
[
"_______", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "_______",
"_______", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "_______",
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "_______", "_______", "_______", "_______", "_______"
],
[
"QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RM_VALU", "RM_HUEU", "RM_SATU", "RM_NEXT", "RM_TOGG", "_______",
"EE_CLR", "_______", "_______", "_______", "_______", "_______", "RM_VALD", "RM_HUED", "RM_SATD", "RM_PREV", "CK_TOGG", "_______",
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "_______", "_______", "_______", "_______", "_______"
]
]
}

View File

@ -0,0 +1,15 @@
{
"development_board": "elite_c",
"matrix_pins": {
"cols": ["F6", "F5", "B6", "D7", "E6", "B4"],
"rows": ["F7", "C6", "D4", "B5"]
},
"split": {
"serial": {
"pin": "D2"
}
},
"ws2812": {
"pin": "D3"
}
}

View File

@ -1,29 +1,27 @@
# TBK Mini # TBK Mini
A split, compact ergonomic keyboard. * Keyboard Maintainer: [Quentin Lebastard](https://github.com/bastardkb)
* Hardware Supported: BastardKB Blackpill or Pro Micro adapter & compatible development boards
* Hardware Availability: [GitHub](https://github.com/Bastardkb/TBK-Mini)
* Keyboard Maintainer: [Bastard Keyboards](https://github.com/Bastardkb/) Make example for this keyboard (after setting up your build environment):
* Hardware Supported: elite-C V4
* Hardware Availability: [Bastardkb.com](https://bastardkb.com/)
## Building the firmware make bastardkb/tbkmini/blackpill:default
make bastardkb/tbkmini/promicro:default
**You must specify the shield version when compiling/flashing the firmware.** Flashing example for this keyboard:
The template is: make bastardkb/tbkmini/blackpill:default:flash
make bastardkb/tbkmini/promicro:default:flash
```shell Note if using the `promicro` version: If you are using an Elite-C compatible development board, see [here](../readme.md#handedness-in-on-elite-c-holder) for setting handedness by pin.
qmk compile -kb bastardkb/tbkmini/{VERSION}/elitec -km {KEYMAP}
```
| Shield Version | default | via |
| --------------- | -------------------------------------------------------------- | ---------------------------------------------------------- |
| v1 (Elite-C) | `qmk compile -kb bastardkb/tbkmini/v1/elitec -km default` | `qmk compile -kb bastardkb/tbkmini/v1/elitec -km via` |
| v2 (Elite-C) | `qmk compile -kb bastardkb/tbkmini/v2/elitec -km default` | `qmk compile -kb bastardkb/tbkmini/v2/elitec -km via` |
| v2 (Splinky v2) | `qmk compile -kb bastardkb/tbkmini/v2/splinky/v2 -km default` | `qmk compile -kb bastardkb/tbkmini/v2/splinky/v2 -km via` |
| v2 (Splinky v3) | `qmk compile -kb bastardkb/tbkmini/v2/splinky/v3 -km default` | `qmk compile -kb bastardkb/tbkmini/v2/splinky/v3 -km via` |
| v2 (STeMCell) | `qmk compile -kb bastardkb/tbkmini/v2/stemcell -km default` | `qmk compile -kb bastardkb/tbkmini/v2/stemcell -km via` |
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
See the [keyboard build instructions](http://docs.bastardkb.com/) ## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the adapter PCB
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@ -1,61 +0,0 @@
/**
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
// left
{ 0, 5, 6, 11, 12, 15 },
{ 1, 4, 7, 10, 13, 16 },
{ 2, 3, 8, 9, 14, 17 },
{ NO_LED, 18, NO_LED, 19, 20, NO_LED },
// right
{ 21, 26, 27, 32, 33, 36 },
{ 22, 25, 28, 31, 34, 37 },
{ 23, 24, 29, 30, 35, 38 },
{ NO_LED, 39, NO_LED, 40, 41, NO_LED }
}, {
// left
{ 0, 0 }, { 0, 21 }, { 0, 42 }, // col 1
{ 20, 42 }, { 20, 21 }, { 20, 0 }, // col 2
{ 41, 0 }, { 41, 21 }, { 41, 42 },
{ 61, 42 }, { 61, 21 }, { 61, 0 },
{ 81, 0 }, { 81, 21 }, { 81, 42 },
{ 102, 0 }, { 102, 21 }, { 102, 42 },
{ 61, 64 }, { 81, 64 }, { 102, 64 }, // left thumb cluster
// right
{ 224, 0 }, { 224, 21 }, { 224, 42 }, // col 12
{ 204, 42 }, { 204, 21 }, { 204, 0 }, // col 11
{ 183, 0 }, { 183, 21 }, { 183, 42 },
{ 163, 42 }, { 163, 21 }, { 163, 0 },
{ 142, 0 }, { 142, 21 }, { 142, 42 },
{ 122, 0 }, { 122, 21 }, { 122, 42 },
{ 163, 64 }, { 142, 64 }, { 122, 64 } // right thumb cluster
}, {
// left
2, 2, 2, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4,
2, 2, 2,
// right
2, 2, 2, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4,
2, 2, 2
} };
#endif
// clang-format on

View File

@ -1,22 +0,0 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Handedness. */
#define MASTER_RIGHT

View File

@ -1,31 +0,0 @@
{
"keyboard_name": "TBK Mini Elite-C",
"usb": {
"device_version": "1.0.0"
},
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"rgb_matrix": true
},
"ws2812": {
"pin": "D2"
},
"rgb_matrix": {
"driver": "ws2812"
},
"matrix_pins": {
"cols": ["B4", "E6", "C6", "B1", "B3", "B2"],
"rows": ["B5", "F7", "F6", "B6"]
},
"diode_direction": "ROW2COL",
"split": {
"enabled": true,
"serial": {
"pin": "D0"
}
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu"
}

View File

@ -1 +0,0 @@
AUDIO_SUPPORTED = no # Audio is not supported

View File

@ -1,21 +0,0 @@
/*
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Handedness. */
#define MASTER_RIGHT

View File

@ -1,31 +0,0 @@
{
"keyboard_name": "TBK Mini Elite-C",
"usb": {
"device_version": "2.0.0"
},
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"rgb_matrix": true
},
"ws2812": {
"pin": "D3"
},
"rgb_matrix": {
"driver": "ws2812"
},
"matrix_pins": {
"cols": ["F6", "F5", "B6", "D7", "E6", "B4"],
"rows": ["F7", "C6", "D4", "B5"]
},
"diode_direction": "ROW2COL",
"split": {
"enabled": true,
"serial": {
"pin": "D2"
}
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu"
}

View File

@ -1 +0,0 @@
AUDIO_SUPPORTED = no # Audio is not supported

View File

@ -1,31 +0,0 @@
/*
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Handedness. */
#define MASTER_RIGHT
// To use the handedness pin, resistors need to be installed on the adapter PCB.
// If so, uncomment the following code, and undefine MASTER_RIGHT above.
// #define SPLIT_HAND_PIN GP13
// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left.
/* Reset. */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U

View File

@ -1,32 +0,0 @@
{
"keyboard_name": "TBK Mini Splinky",
"usb": {
"device_version": "2.0.0"
},
"features": {
"bootmagic": true,
"mousekey": false,
"extrakey": true,
"rgb_matrix": true
},
"rgb_matrix": {
"driver": "ws2812"
},
"matrix_pins": {
"cols": ["GP27", "GP28", "GP15", "GP6", "GP7", "GP8"],
"rows": ["GP26", "GP5", "GP4", "GP9"]
},
"diode_direction": "ROW2COL",
"split": {
"enabled": true,
"serial": {
"pin": "GP1"
}
},
"ws2812": {
"pin": "GP0",
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040"
}

View File

@ -1,5 +0,0 @@
# Splinky controller
The splinky is a Pro-Micro/Elite-C replacement with USB-C and RP2040.
See [plut0nium/0xB2](https://github.com/plut0nium/0xB2/#releases) to figure out the right version for you (v2 or v3).

View File

@ -1,3 +0,0 @@
AUDIO_SUPPORTED = no # Audio is not supported
SERIAL_DRIVER = vendor

View File

@ -1,31 +0,0 @@
/*
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Handedness. */
#define MASTER_RIGHT
// To use the handedness pin, resistors need to be installed on the adapter PCB.
// If so, uncomment the following code, and undefine MASTER_RIGHT above.
// #define SPLIT_HAND_PIN GP15
// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left.
/* Reset. */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U

View File

@ -1,32 +0,0 @@
{
"keyboard_name": "TBK Mini Splinky",
"usb": {
"device_version": "2.0.0"
},
"features": {
"bootmagic": true,
"mousekey": false,
"extrakey": true,
"rgb_matrix": true
},
"rgb_matrix": {
"driver": "ws2812"
},
"matrix_pins": {
"cols": ["GP27", "GP28", "GP21", "GP6", "GP7", "GP8"],
"rows": ["GP26", "GP5", "GP4", "GP9"]
},
"diode_direction": "ROW2COL",
"split": {
"enabled": true,
"serial": {
"pin": "GP1"
}
},
"ws2812": {
"pin": "GP0",
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040"
}

View File

@ -1,5 +0,0 @@
# Splinky controller
The splinky is a Pro-Micro/Elite-C replacement with USB-C and RP2040.
See [plut0nium/0xB2](https://github.com/plut0nium/0xB2/#releases) to figure out the right version for you (v2 or v3).

View File

@ -1,3 +0,0 @@
AUDIO_SUPPORTED = no # Audio is not supported
SERIAL_DRIVER = vendor

View File

@ -1,38 +0,0 @@
/*
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Handedness. */
#define MASTER_RIGHT
// To use the handedness pin, resistors need to be installed on the adapter PCB.
// If so, uncomment the following code, and undefine MASTER_RIGHT above.
// #define A0 PAL_LINE(GPIOA, 0)
// #define SPLIT_HAND_PIN A0
// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left.
/* RGB settings. */
#define WS2812_PWM_DRIVER PWMD2
#define WS2812_PWM_CHANNEL 4
#define WS2812_PWM_PAL_MODE 1
#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7
#define WS2812_PWM_DMA_CHANNEL 3
/* CRC. */
#define CRC8_USE_TABLE
#define CRC8_OPTIMIZE_SPEED

View File

@ -1,23 +0,0 @@
/*
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define HAL_USE_PWM TRUE
#define HAL_USE_SERIAL TRUE
#include_next <halconf.h>

View File

@ -1,34 +0,0 @@
{
"keyboard_name": "TBK Mini STeMCell",
"usb": {
"device_version": "2.0.0"
},
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"rgb_matrix": true
},
"rgb_matrix": {
"driver": "ws2812"
},
"ws2812": {
"pin": "A2",
"driver": "pwm"
},
"build": {
"debounce_type": "asym_eager_defer_pk"
},
"matrix_pins": {
"cols": ["B1", "B2", "A4", "B4", "B5", "B8"],
"rows": ["B0", "B3", "A15", "B9"]
},
"diode_direction": "ROW2COL",
"split": {
"enabled": true,
"serial": {
"pin": "A3"
}
},
"development_board": "stemcell"
}

View File

@ -1,29 +0,0 @@
/*
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include_next <mcuconf.h>
#undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 FALSE
#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 5

View File

@ -1,3 +0,0 @@
AUDIO_SUPPORTED = no # Audio is not supported
SERIAL_DRIVER = usart