aboutsummaryrefslogtreecommitdiff
path: root/keyboards/bastardkb/tbkmini
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/bastardkb/tbkmini')
-rw-r--r--keyboards/bastardkb/tbkmini/config.h106
-rw-r--r--keyboards/bastardkb/tbkmini/info.json53
-rw-r--r--keyboards/bastardkb/tbkmini/keymaps/default/keymap.c70
-rw-r--r--keyboards/bastardkb/tbkmini/readme.md15
-rw-r--r--keyboards/bastardkb/tbkmini/rules.mk29
-rw-r--r--keyboards/bastardkb/tbkmini/tbkmini.c59
-rw-r--r--keyboards/bastardkb/tbkmini/tbkmini.h37
7 files changed, 369 insertions, 0 deletions
diff --git a/keyboards/bastardkb/tbkmini/config.h b/keyboards/bastardkb/tbkmini/config.h
new file mode 100644
index 000000000..b2308bc8e
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/config.h
@@ -0,0 +1,106 @@
1/*
2 * Copyright 2021 Quentin LEBASTARD <[email protected]>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19#include "config_common.h"
20#define VENDOR_ID 0xA8F8
21#define PRODUCT_ID 0x1828
22#define DEVICE_VER 0x0001
23#define MANUFACTURER Bastard Keyboards
24#define PRODUCT TBK Mini
25
26#define MATRIX_ROWS 8
27#define MATRIX_COLS 6
28#define RGBLIGHT_LIMIT_VAL 180
29#define MATRIX_ROW_PINS { B5, F7, F6, B6 }
30#define MATRIX_COL_PINS { B4, E6, C6, B1, B3, B2 }
31
32#define DIODE_DIRECTION ROW2COL
33
34#define RGB_DI_PIN D2
35#define RGBLED_NUM 42
36#define RGBLED_SPLIT { 21, 21 }
37#define RGBLIGHT_ANIMATIONS
38
39#define DEBOUNCE 5
40
41#define SOFT_SERIAL_PIN D0
42
43#define LOCKING_SUPPORT_ENABLE
44#define LOCKING_RESYNC_ENABLE
45#define F_SCL 400000L
46#define USB_POLLING_INTERVAL_MS 1
47#define MASTER_RIGHT
48
49// RGB matrix support
50#ifdef RGB_MATRIX_ENABLE
51# define SPLIT_TRANSPORT_MIRROR
52# define DRIVER_LED_TOTAL 42 // Number of LEDs
53# define RGB_MATRIX_SPLIT { 21, 21 }
54# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
55# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
56# define RGB_DISABLE_WHEN_USB_SUSPENDED
57# define RGB_MATRIX_KEYPRESSES
58// RGB Matrix Animation modes. Explicitly enabled
59// For full list of effects, see:
60// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
61# define ENABLE_RGB_MATRIX_ALPHAS_MODS
62# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
63# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
64# define ENABLE_RGB_MATRIX_BREATHING
65# define ENABLE_RGB_MATRIX_BAND_SAT
66# define ENABLE_RGB_MATRIX_BAND_VAL
67# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
68# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
69# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
70# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
71# define ENABLE_RGB_MATRIX_CYCLE_ALL
72# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
73# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
74# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
75# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
76# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
77# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
78# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
79# define ENABLE_RGB_MATRIX_DUAL_BEACON
80# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
81# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
82# define ENABLE_RGB_MATRIX_RAINDROPS
83# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
84# define ENABLE_RGB_MATRIX_HUE_BREATHING
85# define ENABLE_RGB_MATRIX_HUE_PENDULUM
86# define ENABLE_RGB_MATRIX_HUE_WAVE
87# define ENABLE_RGB_MATRIX_PIXEL_RAIN
88# define ENABLE_RGB_MATRIX_PIXEL_FLOW
89# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
90// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
91# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
92# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
93// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
94# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
95# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
96# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
97# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
98# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
99# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
100# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
101# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
102# define ENABLE_RGB_MATRIX_SPLASH
103# define ENABLE_RGB_MATRIX_MULTISPLASH
104# define ENABLE_RGB_MATRIX_SOLID_SPLASH
105# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
106#endif
diff --git a/keyboards/bastardkb/tbkmini/info.json b/keyboards/bastardkb/tbkmini/info.json
new file mode 100644
index 000000000..d7fddeb7e
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/info.json
@@ -0,0 +1,53 @@
1{
2 "keyboard_name": "TBK Mini",
3 "url": "https://www.bastardkb.com",
4 "maintainer": "Quentin Lebastard",
5 "layouts": {
6 "LAYOUT_split_3x6_3": {
7 "layout": [
8 {"label":"L00", "x":0, "y":0},
9 {"label":"L01", "x":1, "y":0},
10 {"label":"L02", "x":2, "y":0},
11 {"label":"L03", "x":3, "y":0},
12 {"label":"L04", "x":4, "y":0},
13 {"label":"L05", "x":5, "y":0},
14 {"label":"R00", "x":11, "y":0},
15 {"label":"R01", "x":12, "y":0},
16 {"label":"R02", "x":13, "y":0},
17 {"label":"R03", "x":14, "y":0},
18 {"label":"R04", "x":15, "y":0},
19 {"label":"R05", "x":16, "y":0},
20 {"label":"L10", "x":0, "y":1},
21 {"label":"L11", "x":1, "y":1},
22 {"label":"L12", "x":2, "y":1},
23 {"label":"L13", "x":3, "y":1},
24 {"label":"L14", "x":4, "y":1},
25 {"label":"L15", "x":5, "y":1},
26 {"label":"R10", "x":11, "y":1},
27 {"label":"R11", "x":12, "y":1},
28 {"label":"R12", "x":13, "y":1},
29 {"label":"R13", "x":14, "y":1},
30 {"label":"R14", "x":15, "y":1},
31 {"label":"R15", "x":16, "y":1},
32 {"label":"L20", "x":0, "y":2},
33 {"label":"L21", "x":1, "y":2},
34 {"label":"L22", "x":2, "y":2},
35 {"label":"L23", "x":3, "y":2},
36 {"label":"L24", "x":4, "y":2},
37 {"label":"L25", "x":5, "y":2},
38 {"label":"R20", "x":11, "y":2},
39 {"label":"R21", "x":12, "y":2},
40 {"label":"R22", "x":13, "y":2},
41 {"label":"R23", "x":14, "y":2},
42 {"label":"R24", "x":15, "y":2},
43 {"label":"R25", "x":16, "y":2},
44 {"label":"L33", "x":5, "y":3},
45 {"label":"L34", "x":6, "y":3},
46 {"label":"L31", "x":7, "y":3},
47 {"label":"R33", "x":9, "y":3},
48 {"label":"R34", "x":10, "y":3},
49 {"label":"R31", "x":11, "y":3}
50 ]
51 }
52 }
53}
diff --git a/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c b/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c
new file mode 100644
index 000000000..8006f11ce
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c
@@ -0,0 +1,70 @@
1/*
2 * Copyright 2021 Quentin LEBASTARD <[email protected]>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include QMK_KEYBOARD_H
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21
22 [0] = LAYOUT_split_3x6_3(
23 //,-----------------------------------------------------. ,-----------------------------------------------------.
24 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
25 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
26 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
27 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
28 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
29 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
30 KC_LGUI, KC_SPC , MO(1), MO(2), KC_ENT , KC_RALT
31 //`--------------------------' `--------------------------'
32
33 ),
34
35 [1] = LAYOUT_split_3x6_3(
36 //,-----------------------------------------------------. ,-----------------------------------------------------.
37 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
38 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
39 KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
40 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
41 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
42 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
43 KC_LGUI, KC_SPC, _______, MO(3), KC_ENT, KC_RALT
44 //`--------------------------' `--------------------------'
45 ),
46
47 [2] = LAYOUT_split_3x6_3(
48 //,-----------------------------------------------------. ,-----------------------------------------------------.
49 KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
50 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
51 KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
52 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
53 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
54 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
55 KC_LGUI, KC_SPC, MO(3), _______, KC_ENT, KC_RALT
56 //`--------------------------' `--------------------------'
57 ),
58
59 [3] = LAYOUT_split_3x6_3(
60 //,-----------------------------------------------------. ,-----------------------------------------------------.
61 RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
62 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
63 RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
64 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
65 RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
66 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
67 KC_LGUI, KC_SPC, _______, _______, KC_ENT, KC_RALT
68 //`--------------------------' `--------------------------'
69 )
70};
diff --git a/keyboards/bastardkb/tbkmini/readme.md b/keyboards/bastardkb/tbkmini/readme.md
new file mode 100644
index 000000000..8be8200ff
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/readme.md
@@ -0,0 +1,15 @@
1# TBK Mini
2
3A split, compact ergonomic keyboard.
4
5* Keyboard Maintainer: [Bastard Keyboards](https://github.com/Bastardkb/)
6* Hardware Supported: elite-C V4
7* Hardware Availability: [Bastardkb.com](https://bastardkb.com/)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make bastardkb/tbkmini:default
12
13See 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).
14
15See the [keyboard build instructions](http://docs.bastardkb.com/) \ No newline at end of file
diff --git a/keyboards/bastardkb/tbkmini/rules.mk b/keyboards/bastardkb/tbkmini/rules.mk
new file mode 100644
index 000000000..2892f5dd6
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/rules.mk
@@ -0,0 +1,29 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = yes # Enable N-Key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
19RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE)
20RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support
21AUDIO_ENABLE = no # Audio output
22SPLIT_KEYBOARD = yes
23LTO_ENABLE = yes
24
25AUDIO_SUPPORTED = no
26RGB_MATRIX_SUPPORTED = yes
27RGBLIGHT_SUPPORTED = yes
28
29LAYOUTS = split_3x6_3
diff --git a/keyboards/bastardkb/tbkmini/tbkmini.c b/keyboards/bastardkb/tbkmini/tbkmini.c
new file mode 100644
index 000000000..7bbd374c0
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/tbkmini.c
@@ -0,0 +1,59 @@
1/*
2 * Copyright 2021 Quentin LEBASTARD <[email protected]>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "tbkmini.h"
19
20#ifdef RGB_MATRIX_ENABLE
21led_config_t g_led_config = { {
22 // left
23 { 0, 5, 6, 11, 12, 15 },
24 { 1, 4, 7, 10, 13, 16 },
25 { 2, 3, 8, 9, 14, 17 },
26 { NO_LED, 18, NO_LED, 19, 20, NO_LED },
27 // right
28 { 21, 26, 27, 32, 33, 36 },
29 { 22, 25, 28, 31, 34, 37 },
30 { 23, 24, 29, 30, 35, 38 },
31 { NO_LED, 39, NO_LED, 40, 41, NO_LED }
32}, {
33 // left
34 { 0, 0 }, { 0, 21 }, { 0, 42 }, // col 1
35 { 20, 42 }, { 20, 21 }, { 20, 0 }, // col 2
36 { 41, 0 }, { 41, 21 }, { 41, 42 },
37 { 61, 42 }, { 61, 21 }, { 61, 0 },
38 { 81, 0 }, { 81, 21 }, { 81, 42 },
39 { 102, 0 }, { 102, 21 }, { 102, 42 },
40 { 61, 64 }, { 81, 64 }, { 102, 64 }, // left thumb cluster
41 // right
42 { 224, 0 }, { 224, 21 }, { 224, 42 }, // col 12
43 { 204, 42 }, { 204, 21 }, { 204, 0 }, // col 11
44 { 183, 0 }, { 183, 21 }, { 183, 42 },
45 { 163, 42 }, { 163, 21 }, { 163, 0 },
46 { 142, 0 }, { 142, 21 }, { 142, 42 },
47 { 122, 0 }, { 122, 21 }, { 122, 42 },
48 { 163, 64 }, { 142, 64 }, { 122, 64 } // right thumb cluster
49}, {
50 // left
51 2, 2, 2, 4, 4, 4, 4, 4, 4,
52 4, 4, 4, 4, 4, 4, 4, 4, 4,
53 2, 2, 2,
54 // right
55 2, 2, 2, 4, 4, 4, 4, 4, 4,
56 4, 4, 4, 4, 4, 4, 4, 4, 4,
57 2, 2, 2
58} };
59#endif
diff --git a/keyboards/bastardkb/tbkmini/tbkmini.h b/keyboards/bastardkb/tbkmini/tbkmini.h
new file mode 100644
index 000000000..66235f4f4
--- /dev/null
+++ b/keyboards/bastardkb/tbkmini/tbkmini.h
@@ -0,0 +1,37 @@
1/*
2 * Copyright 2021 Quentin LEBASTARD <[email protected]>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18
19#pragma once
20#include "quantum.h"
21
22#define LAYOUT_split_3x6_3( \
23 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
24 k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
25 k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
26 k33, k34, k31, k71, k74, k73 \
27)\
28{\
29 { k00, k01, k02, k03, k04, k05 }, \
30 { k10, k11, k12, k13, k14, k15 }, \
31 { k20, k21, k22, k23, k24, k25 }, \
32 { KC_NO, k31, KC_NO, k33, k34, KC_NO }, \
33 { k40, k41, k42, k43, k44, k45 }, \
34 { k50, k51, k52, k53, k54, k55 }, \
35 { k60, k61, k62, k63, k64, k65 }, \
36 { KC_NO, k71, KC_NO, k73, k74, KC_NO }, \
37}