Skip to content

Commit 50a12c0

Browse files
0xcharlyNathanCharly Delay
authored
[keyboard] bastardkb: restructure folder hierarchy (qmk#16778)
* bastardkb: restructure folder hierarchy ahead of supporting other adapters/mcus Upcoming support for the following (adapter, mcu) pairs will be submitted in follow-up PRs: - `v2/elitec` - `v2/stemcell` - `blackpill` This PR contains the following changes: - Move previous implementation to an inner `v1/elitec` folder - Move keyboard USB IDs and strings to data driven - Update headers to update maintainers list - Run `qmk format-c` * bastardkb/charybdis: remove broken acceleration implementation * bastardkb/charybdis: fix debug output * bastardkb: add support for BastardKb the `v2/elitec` (adapter, mcu) pair * bastardkb: add Blackpill support * bastardkb/charybdis/3x5: add `bstiq` keymap * bastardkb/charybdis: add fake LEDs to the configuration For the Charybdis 3x5 (respectively 4x6), the LED config now simulates 36 (respectively 58) LEDs instead of the actual 35 (respectively 56) to prevent confusion when testing LEDs during assembly when handedness is not set correctly. Those fake LEDs are bound to the physical bottom-left corner. * bastardkbk/charybdis/readme.md: update build commands Merge pull request #5 from Nathancooke7/update_charybdis_readme_v2_shield. * bastardkb/charybdis: fix Via keymap with blackpill * bastardkb/charybdis: add 3x6 configuration * bastardkb/charybdis: remove unnecessary files * bastardkb/charybdis: remove obsolete code * bastardkb/charybdis/3x6: add Via keymap * bastardkb: add support for Splinky (RP2040) board * bastardkb: initial configuration for the Splinky (SPI not working yet) * bastardkb/charybdis/3x5/v2/splinky: tentative change to enable trackball * bastardkb/charybdis/3x5/v2/splinky: fix SCK, MISO, MOSI pins * bastardkb/charybdis/3x5/v2/splinky: fix SCK, MISO, MOSI pins * bastardkb/charybdis/4x6/v2/splinky: add SPI configuration and enable trackball * bastardkb/charybdis/3x6: add splinky config * bastardkb/*/v2/splinky: update drivers to `vendor` * bastardkb/dilemma: add new board * bastardkb/charybdis: fix infinite loop in `layer_state_set_user(…)` in the `via` keymaps * bastardkb/dilemma: add `bstiq` keymap * bastardkb: specify blackpill boards * bastardkb/charybdis: fix blackpill-specific define syntax * bastardkb: remove `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` which are no longer valid options * bastardkb: fix `QK_BOOT` keycodes * bastardkb/dilemma: fix mouse direction on X axis * bastardkb/charybdis/3x6: adjust CS * bastardkb/dilemma: adjust trackpad configuration * charybdis: fix `PWM33XX_CS_PIN` defines This is a follow-up of qmk#17613. * bastardkb: remove Vial mentions from `bstiq` keymaps * Cleanup unnecessary comments Co-authored-by: Nathan <[email protected]> Co-authored-by: Charly Delay <[email protected]>
1 parent 336df32 commit 50a12c0

File tree

156 files changed

+5256
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+5256
-639
lines changed

keyboards/bastardkb/charybdis/3x5/3x5.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
* ╰────────────────────╯ ╰────────────────────╯
3434
* 15 16 17 33 34 XX
3535
* ╰────────────╯ ╰────────────╯
36+
*
37+
* Note: the LED config simulates 36 LEDs instead of the actual 35 to prevent
38+
* confusion when testing LEDs during assembly when handedness is not set
39+
* correctly. Those fake LEDs are bound to the physical top-left corner.
3640
*/
3741
led_config_t g_led_config = { {
3842
/* Key Matrix to LED index. */
@@ -61,7 +65,7 @@ led_config_t g_led_config = { {
6165
/* index=24 */ { 188, 42 }, { 188, 21 }, { 188, 0 },
6266
/* index=27 */ { 170, 0 }, { 170, 21 }, { 170, 42 },
6367
/* index=30 */ { 152, 0 }, { 152, 21 }, { 152, 42 },
64-
/* index=33 */ { 152, 64 }, { 134, 64 },
68+
/* index=33 */ { 134, 64 }, { 152, 64 }, { 0, 0 },
6569
}, {
6670
/* LED index to flag. */
6771
// Left split.
@@ -77,7 +81,7 @@ led_config_t g_led_config = { {
7781
/* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
7882
/* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
7983
/* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
80-
/* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
84+
/* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
8185
} };
8286
#endif
8387
// clang-format on
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright 2020 Christopher Courtney <[email protected]> (@drashna)
3+
* Copyright 2021 Stefan Kerkmann (@KarlK90)
4+
* Copyright 2021 Charly Delay <[email protected]> (@0xcharly)
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Publicw License as published by
8+
* the Free Software Foundation, either version 2 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
#pragma once
21+
22+
/* Key matrix configuration. */
23+
#define MATRIX_ROW_PINS \
24+
{ A2, B8, A8, B9 }
25+
#define MATRIX_COL_PINS \
26+
{ B1, B10, B3, B4, B5 }
27+
28+
/* Handedness. */
29+
#define SPLIT_HAND_PIN A3 // High -> left, Low -> right.
30+
31+
/* RGB settings. */
32+
#define RGB_DI_PIN A1
33+
#define WS2812_PWM_DRIVER PWMD2
34+
#define WS2812_PWM_CHANNEL 2
35+
#define WS2812_PWM_PAL_MODE 1
36+
#define WS2812_EXTERNAL_PULLUP
37+
#define WS2812_DMA_STREAM STM32_DMA1_STREAM1
38+
#define WS2812_DMA_CHANNEL 3
39+
#define WS2812_PWM_TARGET_PERIOD 800000
40+
41+
/* Serial configuration for split keyboard. */
42+
#define SERIAL_USART_TX_PIN A9
43+
44+
/* CRC. */
45+
#define CRC8_USE_TABLE
46+
#define CRC8_OPTIMIZE_SPEED
47+
48+
/* SPI config for EEPROM and pmw3360 sensor. */
49+
#define SPI_DRIVER SPID1
50+
#define SPI_SCK_PIN A5
51+
#define SPI_SCK_PAL_MODE 5
52+
#define SPI_MOSI_PIN A7
53+
#define SPI_MOSI_PAL_MODE 5
54+
#define SPI_MISO_PIN A6
55+
#define SPI_MISO_PAL_MODE 5
56+
57+
/* EEPROM config. */
58+
#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4
59+
60+
/* PMW3360 settings. */
61+
#define PMW33XX_CS_PIN B14
62+
#define PMW33XX_CS_DIVISOR 64
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2020 Nick Brassel (tzarc)
3+
* Copyright 2021 Charly Delay <[email protected]> (@0xcharly)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 2 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
#pragma once
20+
21+
#define HAL_USE_PWM TRUE
22+
#define HAL_USE_SERIAL TRUE
23+
//#define HAL_USE_I2C TRUE
24+
#define HAL_USE_SPI TRUE
25+
#define SPI_USE_WAIT TRUE
26+
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
27+
//#define HAL_USE_GPT TRUE
28+
29+
#include_next "halconf.h"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"keyboard_name": "Charybdis Nano (3x5) Blackpill",
3+
"usb": {
4+
"device_version": "1.0.0",
5+
},
6+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright 2020 Nick Brassel (tzarc)
3+
* Copyright 2021 Stefan Kerkmann (@KarlK90)
4+
* Copyright 2021 Charly Delay <[email protected]> (@0xcharly)
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 2 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
#pragma once
21+
22+
#include_next "mcuconf.h"
23+
24+
#undef STM32_I2C_USE_I2C1
25+
#define STM32_I2C_USE_I2C1 TRUE
26+
27+
#undef STM32_I2C_I2C1_RX_DMA_STREAM
28+
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
29+
#undef STM32_I2C_I2C1_TX_DMA_STREAM
30+
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
31+
32+
#undef STM32_PWM_USE_TIM2
33+
#define STM32_PWM_USE_TIM2 TRUE
34+
35+
#undef STM32_PWM_USE_TIM3
36+
#define STM32_PWM_USE_TIM3 TRUE
37+
38+
#undef STM32_SPI_USE_SPI1
39+
#define STM32_SPI_USE_SPI1 TRUE
40+
41+
#undef STM32_SPI_SPI1_RX_DMA_STREAM
42+
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
43+
#undef STM32_SPI_SPI1_TX_DMA_STREAM
44+
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
45+
46+
#undef STM32_SERIAL_USE_USART1
47+
#define STM32_SERIAL_USE_USART1 TRUE
48+
49+
// #undef STM32_SERIAL_USE_USART2
50+
// #define STM32_SERIAL_USE_USART2 TRUE
51+
52+
// #undef STM32_UART_USART2_RX_DMA_STREAM
53+
// #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
54+
// #undef STM32_UART_USART2_TX_DMA_STREAM
55+
// #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
56+
57+
#undef STM32_GPT_USE_TIM4
58+
#define STM32_GPT_USE_TIM4 TRUE
59+
60+
#undef STM32_ST_USE_TIMER
61+
#define STM32_ST_USE_TIMER 5
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Charybdis Nano (3x5) BlackPill
2+
3+
An ergonomic keyboard with integrated trackball, with BlackPill (STM32F411) mod.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# MCU name
2+
MCU = STM32F411
3+
BOARD = BLACKPILL_STM32_F411
4+
5+
# Bootloader selection
6+
BOOTLOADER = stm32-dfu
7+
8+
# Build Options
9+
# change yes to no to disable
10+
#
11+
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
12+
MOUSEKEY_ENABLE = yes # Mouse keys
13+
EXTRAKEY_ENABLE = yes # Audio control and System control
14+
CONSOLE_ENABLE = no # Console for debug
15+
COMMAND_ENABLE = no # Commands for debug and configuration
16+
NKRO_ENABLE = no # Enable N-Key Rollover
17+
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
18+
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
19+
AUDIO_ENABLE = no # Audio output
20+
21+
AUDIO_SUPPORTED = no # Audio is not supported
22+
RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default
23+
RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default
24+
RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality
25+
RGB_MATRIX_DRIVER = WS2812
26+
27+
# Charybdis nano is a split 3x5 keyboard with a maximum of 3 thumb keys (2 on
28+
# the trackball side).
29+
SPLIT_KEYBOARD = yes
30+
LAYOUTS = split_3x5_3 # Support community layout, in particular Manna-Harbour's Miryoku layout
31+
32+
POINTING_DEVICE_ENABLE = yes # Enable trackball
33+
POINTING_DEVICE_DRIVER = pmw3360
34+
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
35+
KEYBOARD_SHARED_EP = yes
36+
37+
EEPROM_DRIVER = spi
38+
WS2812_DRIVER = pwm
39+
SERIAL_DRIVER = usart
40+
41+
DEBOUNCE_TYPE = asym_eager_defer_pk

keyboards/bastardkb/charybdis/3x5/config.h

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,58 +18,24 @@
1818

1919
#pragma once
2020

21-
#define VENDOR_ID 0xA8F8
22-
#define PRODUCT_ID 0x1832
23-
#define DEVICE_VER 0x0001
24-
#define MANUFACTURER Bastard Keyboards
25-
#define PRODUCT Charybdis Nano
21+
#include "config_common.h"
2622

2723
/* Key matrix configuration. */
28-
29-
// Rows are doubled-up.
30-
#define MATRIX_ROWS 8
24+
#define MATRIX_ROWS 8 // Rows are doubled-up.
3125
#define MATRIX_COLS 5
3226

33-
// Wiring configuration for each half.
34-
#define MATRIX_ROW_PINS \
35-
{ B7, C6, D4, B5 }
36-
#define MATRIX_COL_PINS \
37-
{ C7, F0, D7, E6, B4 }
38-
39-
#define MATRIX_ROW_PINS_RIGHT \
40-
{ F0, C6, D4, B5 }
41-
#define MATRIX_COL_PINS_RIGHT \
42-
{ C7, B7, D7, E6, B4 }
43-
4427
#define DIODE_DIRECTION ROW2COL
4528

46-
/* Handedness. */
47-
#define MASTER_RIGHT
48-
49-
/* Bootmagic Lite configuration. */
50-
#define BOOTMAGIC_LITE_ROW 0
51-
#define BOOTMAGIC_LITE_COLUMN 0
52-
#define BOOTMAGIC_LITE_ROW_RIGHT 4
53-
#define BOOTMAGIC_LITE_COLUMN_RIGHT 0
54-
55-
/* serial.c configuration (for split keyboard) */
56-
#define SOFT_SERIAL_PIN D2
57-
5829
/* Set 0 if debouncing isn't needed. */
5930
#define DEBOUNCE 5
6031

61-
/* PMW33XX settings. */
62-
#define PMW33XX_CS_PIN B0
63-
64-
// Trackball angle adjustment.
32+
/* Trackball angle adjustment. */
6533
#define ROTATIONAL_TRANSFORM_ANGLE -25
6634

6735
/* RGB settings. */
68-
69-
#define RGB_DI_PIN D3
70-
#define RGBLED_NUM 35
36+
#define RGBLED_NUM 36
7137
#define RGBLED_SPLIT \
72-
{ 18, 17 }
38+
{ 18, 18 }
7339

7440
/* RGB matrix support. */
7541
#ifdef RGB_MATRIX_ENABLE

keyboards/bastardkb/charybdis/3x5/info.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"keyboard_name": "Charybdis Nano",
3-
"url": "https://www.bastardkb.com",
4-
"maintainer": "Quentin Lebastard",
2+
"url": "https://bastardkb.com/charybdis-nano",
3+
"usb": {
4+
"pid": "0x1832",
5+
},
56
"layouts": {
67
"LAYOUT_charybdis_3x5": {
78
"layout": [
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Charybdis (3x5) @bstiq keymap
2+
3+
Inspired from Miryoku, using home-rows.

0 commit comments

Comments
 (0)