diff options
Diffstat (limited to 'keyboards/splitkb/kyria/rev2/config.h')
-rw-r--r-- | keyboards/splitkb/kyria/rev2/config.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h new file mode 100644 index 000000000..8ff381396 --- /dev/null +++ b/keyboards/splitkb/kyria/rev2/config.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | Copyright 2022 Thomas Baart <thomas@splitkb.com> | ||
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 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #define VENDOR_ID 0x8D1D | ||
22 | #define PRODUCT_ID 0x9D9D | ||
23 | #define DEVICE_VER 0x0002 | ||
24 | #define MANUFACTURER splitkb | ||
25 | #define PRODUCT Kyria rev2 | ||
26 | |||
27 | /* key matrix size */ | ||
28 | /* Rows are doubled up */ | ||
29 | #define MATRIX_ROWS 8 | ||
30 | #define MATRIX_COLS 8 | ||
31 | |||
32 | // wiring | ||
33 | #define MATRIX_ROW_PINS \ | ||
34 | { F6, F7, B1, B3 } | ||
35 | #define MATRIX_COL_PINS \ | ||
36 | { B2, B6, B5, B4, E6, D7, C6, D4 } | ||
37 | #define MATRIX_ROW_PINS_RIGHT \ | ||
38 | { D4, C6, D7, E6 } | ||
39 | #define MATRIX_COL_PINS_RIGHT \ | ||
40 | { B4, B5, B6, B2, B3, B1, F7, F6 } | ||
41 | #define UNUSED_PINS | ||
42 | |||
43 | #define ENCODERS_PAD_A \ | ||
44 | { F4 } | ||
45 | #define ENCODERS_PAD_B \ | ||
46 | { F5 } | ||
47 | #define ENCODERS_PAD_A_RIGHT \ | ||
48 | { F5 } | ||
49 | #define ENCODERS_PAD_B_RIGHT \ | ||
50 | { F4 } | ||
51 | |||
52 | /* COL2ROW, ROW2COL*/ | ||
53 | #define DIODE_DIRECTION COL2ROW | ||
54 | |||
55 | // Side detection | ||
56 | // col 4 row 3 on right-hand-side | ||
57 | #define SPLIT_HAND_MATRIX_GRID E6, B3 // row first because the board is col2row | ||
58 | #define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT | ||
59 | #define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `rev2.c` | ||
60 | |||
61 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
62 | //#define MATRIX_HAS_GHOST | ||
63 | |||
64 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
65 | #define DEBOUNCE 5 | ||
66 | |||
67 | /* | ||
68 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
69 | */ | ||
70 | |||
71 | #if defined(CONVERT_TO_PROTON_C) | ||
72 | # define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. | ||
73 | # define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. | ||
74 | # define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 | ||
75 | # define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 | ||
76 | # define SERIAL_USART_TX_PIN D3 | ||
77 | # define SERIAL_USART_RX_PIN D2 | ||
78 | |||
79 | # define RGB_DI_PIN PAL_LINE(GPIOA, 3) | ||
80 | # define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 | ||
81 | # define WS2812_PWM_CHANNEL 4 // default: 2 | ||
82 | # define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 | ||
83 | # define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. | ||
84 | # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. | ||
85 | # define WS2812_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. | ||
86 | #else | ||
87 | # define RGB_DI_PIN D3 | ||
88 | # define SOFT_SERIAL_PIN D2 | ||
89 | #endif | ||
90 | |||
91 | #define RGBLED_SPLIT \ | ||
92 | { 10, 10 } | ||
93 | #define RGBLED_NUM 20 | ||
94 | |||
95 | #ifdef OLED_ENABLE | ||
96 | # define OLED_DISPLAY_128X64 | ||
97 | # define SPLIT_OLED_ENABLE | ||
98 | #endif | ||
99 | |||
100 | /* RGB matrix support */ | ||
101 | #ifdef RGB_MATRIX_ENABLE | ||
102 | # define SPLIT_TRANSPORT_MIRROR | ||
103 | # define DRIVER_LED_TOTAL RGBLED_NUM // Number of LEDs | ||
104 | # define RGB_MATRIX_SPLIT { 10, 10 } | ||
105 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 | ||
106 | # define RGB_DISABLE_WHEN_USB_SUSPENDED | ||
107 | #endif | ||