From 354a2e40cf8348d043d39b34ca63223f6b5b689c Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 11 Jun 2024 13:25:51 +1000 Subject: [PATCH] splitkb/kyria: remove `CONVERT_TO` at keyboard level (#23857) --- keyboards/splitkb/kyria/info.json | 1 - .../splitkb/kyria/rev1/base/keyboard.json | 25 ++++++++++++-- keyboards/splitkb/kyria/rev1/config.h | 30 ++-------------- keyboards/splitkb/kyria/rev1/info.json | 17 ---------- .../splitkb/kyria/rev1/proton_c/config.h | 17 ++++++++++ .../splitkb/kyria/rev1/proton_c/keyboard.json | 23 ++++++++++++- .../splitkb/kyria/rev1/proton_c/rules.mk | 1 - .../splitkb/kyria/rev2/base/keyboard.json | 34 +++++++++++++++++-- keyboards/splitkb/kyria/rev2/config.h | 31 ++--------------- keyboards/splitkb/kyria/rev2/info.json | 23 ------------- .../splitkb/kyria/rev2/proton_c/config.h | 17 ++++++++++ .../splitkb/kyria/rev2/proton_c/keyboard.json | 32 ++++++++++++++++- .../splitkb/kyria/rev2/proton_c/rules.mk | 1 - keyboards/splitkb/kyria/rev3/config.h | 7 ++-- keyboards/splitkb/kyria/rev3/keyboard.json | 4 +-- 15 files changed, 149 insertions(+), 114 deletions(-) create mode 100644 keyboards/splitkb/kyria/rev1/proton_c/config.h create mode 100644 keyboards/splitkb/kyria/rev2/proton_c/config.h diff --git a/keyboards/splitkb/kyria/info.json b/keyboards/splitkb/kyria/info.json index f70e8e3bb22..050e12f2ff5 100644 --- a/keyboards/splitkb/kyria/info.json +++ b/keyboards/splitkb/kyria/info.json @@ -6,7 +6,6 @@ "vid": "0x8D1D", "device_version": "1.0.0" }, - "development_board": "elite_c", "split": { "enabled": true }, diff --git a/keyboards/splitkb/kyria/rev1/base/keyboard.json b/keyboards/splitkb/kyria/rev1/base/keyboard.json index 9f75b9c218b..df92d71ad13 100644 --- a/keyboards/splitkb/kyria/rev1/base/keyboard.json +++ b/keyboards/splitkb/kyria/rev1/base/keyboard.json @@ -1,5 +1,26 @@ { - "build": { - "lto": true + "development_board": "elite_c", + "matrix_pins": { + "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], + "rows": ["B4", "E6", "D7", "D4"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B5"} + ] + }, + "split": { + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B5", "pin_b": "C6"} + ] + } + } + }, + "ws2812": { + "pin": "D3" } } diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index 4f130293e22..615d93496dd 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -17,31 +17,5 @@ along with this program. If not, see . #pragma once -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - -#if defined(CONVERT_TO_PROTON_C) -# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. -# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. -# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 -# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 -# define SERIAL_USART_TX_PIN D3 -# define SERIAL_USART_RX_PIN D2 - -# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) -# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 -# define WS2812_PWM_CHANNEL 4 // default: 2 -# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. -#else -# define WS2812_DI_PIN D3 -# define SOFT_SERIAL_PIN D2 -#endif - -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev1/info.json b/keyboards/splitkb/kyria/rev1/info.json index 3d84b37b311..1e21c609782 100644 --- a/keyboards/splitkb/kyria/rev1/info.json +++ b/keyboards/splitkb/kyria/rev1/info.json @@ -23,24 +23,7 @@ "sleep": true, "split_count": [10, 10] }, - "matrix_pins": { - "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], - "rows": ["B4", "E6", "D7", "D4"] - }, - "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "C6", "pin_b": "B5"} - ] - }, "split": { - "encoder": { - "right": { - "rotary": [ - {"pin_a": "B5", "pin_b": "C6"} - ] - } - }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/rev1/proton_c/config.h b/keyboards/splitkb/kyria/rev1/proton_c/config.h new file mode 100644 index 00000000000..df2eb96ae22 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/config.h @@ -0,0 +1,17 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +#define SERIAL_USART_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 + +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json b/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json index 6cc38d4a212..a7181fef8df 100644 --- a/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json +++ b/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json @@ -1,5 +1,26 @@ { + "development_board": "proton_c", + "matrix_pins": { + "cols": ["B9", "B15", "B14", "B13", "B8", "A0", "A1", "A2"], + "rows": ["B1", "B2", "B3", "B5"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B0"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B4"} + ] + } + } + }, "ws2812": { - "driver": "pwm" + "driver": "pwm", + "pin": "A3" } } diff --git a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk index a58b20c575c..c6e29883213 100644 --- a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk +++ b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk @@ -1,2 +1 @@ SERIAL_DRIVER = usart -CONVERT_TO = proton_c diff --git a/keyboards/splitkb/kyria/rev2/base/keyboard.json b/keyboards/splitkb/kyria/rev2/base/keyboard.json index 9f75b9c218b..8de0f335cc5 100644 --- a/keyboards/splitkb/kyria/rev2/base/keyboard.json +++ b/keyboards/splitkb/kyria/rev2/base/keyboard.json @@ -1,5 +1,35 @@ { - "build": { - "lto": true + "development_board": "elite_c", + "matrix_pins": { + "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "C6", "D4"], + "rows": ["F6", "F7", "B1", "B3"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, + "split": { + "handedness": { + "matrix_grid": ["E6", "B3"] + }, + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6"], + "rows": ["D4", "C6", "D7", "E6"] + } + } + }, + "ws2812": { + "pin": "D3" } } diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h index 54d8f0985ae..fb9e7bb9590 100644 --- a/keyboards/splitkb/kyria/rev2/config.h +++ b/keyboards/splitkb/kyria/rev2/config.h @@ -19,34 +19,7 @@ along with this program. If not, see . // Side detection // col 4 row 3 on right-hand-side -#define SPLIT_HAND_MATRIX_GRID E6, B3 // row first because the board is col2row #define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `rev2.c` -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - -#if defined(CONVERT_TO_PROTON_C) -# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. -# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. -# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 -# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 -# define SERIAL_USART_TX_PIN D3 -# define SERIAL_USART_RX_PIN D2 - -# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) -# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 -# define WS2812_PWM_CHANNEL 4 // default: 2 -# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. -#else -# define WS2812_DI_PIN D3 -# define SOFT_SERIAL_PIN D2 -#endif - -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev2/info.json b/keyboards/splitkb/kyria/rev2/info.json index 80f801e3d15..d1507a26b0d 100644 --- a/keyboards/splitkb/kyria/rev2/info.json +++ b/keyboards/splitkb/kyria/rev2/info.json @@ -23,30 +23,7 @@ "sleep": true, "split_count": [10, 10] }, - "matrix_pins": { - "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "C6", "D4"], - "rows": ["F6", "F7", "B1", "B3"] - }, - "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "F4", "pin_b": "F5"} - ] - }, "split": { - "encoder": { - "right": { - "rotary": [ - {"pin_a": "F5", "pin_b": "F4"} - ] - } - }, - "matrix_pins": { - "right": { - "cols": ["B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6"], - "rows": ["D4", "C6", "D7", "E6"] - } - }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/rev2/proton_c/config.h b/keyboards/splitkb/kyria/rev2/proton_c/config.h new file mode 100644 index 00000000000..df2eb96ae22 --- /dev/null +++ b/keyboards/splitkb/kyria/rev2/proton_c/config.h @@ -0,0 +1,17 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +#define SERIAL_USART_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 + +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json b/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json index 6cc38d4a212..43a3d532f22 100644 --- a/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json +++ b/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json @@ -1,5 +1,35 @@ { + "development_board": "proton_c", + "matrix_pins": { + "cols": ["B15", "B9", "B0", "B1", "B2", "B3", "B4", "B5"], + "rows": ["A0", "B8", "B13", "B14"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A2", "pin_b": "A1"} + ] + }, + "split": { + "handedness": { + "matrix_grid": ["B2", "B14"] + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A2"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["B1", "B0", "B9", "B15", "B14", "B13", "B8", "A0"], + "rows": ["B5", "B4", "B3", "B2"] + } + } + }, "ws2812": { - "driver": "pwm" + "driver": "pwm", + "pin": "A3" } } diff --git a/keyboards/splitkb/kyria/rev2/proton_c/rules.mk b/keyboards/splitkb/kyria/rev2/proton_c/rules.mk index a58b20c575c..c6e29883213 100644 --- a/keyboards/splitkb/kyria/rev2/proton_c/rules.mk +++ b/keyboards/splitkb/kyria/rev2/proton_c/rules.mk @@ -1,2 +1 @@ SERIAL_DRIVER = usart -CONVERT_TO = proton_c diff --git a/keyboards/splitkb/kyria/rev3/config.h b/keyboards/splitkb/kyria/rev3/config.h index b0a64320c60..7938384a781 100644 --- a/keyboards/splitkb/kyria/rev3/config.h +++ b/keyboards/splitkb/kyria/rev3/config.h @@ -20,8 +20,5 @@ // but can't yet be given a value #define SPLIT_HAND_PIN B5 -// Not yet available in `info.json` -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev3/keyboard.json b/keyboards/splitkb/kyria/rev3/keyboard.json index 4a426cb2060..750f87ae4b3 100644 --- a/keyboards/splitkb/kyria/rev3/keyboard.json +++ b/keyboards/splitkb/kyria/rev3/keyboard.json @@ -1,14 +1,12 @@ { "keyboard_name": "Kyria rev3", + "development_board": "elite_c", "usb": { "pid": "0xCF44" }, "bootmagic": { "matrix": [0, 6] }, - "build": { - "lto": true - }, "features": { "mousekey": true, "bootmagic": true,