diff options
| author | xerootg <xerootg@users.noreply.github.com> | 2022-01-31 12:40:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 11:40:13 -0800 |
| commit | 1111ff604d1b006ffd29a0c52d7f717b7879cd00 (patch) | |
| tree | 07ff78851c3c4f9c8ee45c6e8c59e4d509ccffc6 /keyboards/redox/rev1/proton_c | |
| parent | 59ebe28cd5e50ffda700f127060f936c2d60ed0a (diff) | |
| download | qmk_firmware-1111ff604d1b006ffd29a0c52d7f717b7879cd00.tar.gz qmk_firmware-1111ff604d1b006ffd29a0c52d7f717b7879cd00.zip | |
[Keyboard] Add the proton c as a controller for the redox (#16106)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: xerootg <xerootg@github.com>
Diffstat (limited to 'keyboards/redox/rev1/proton_c')
| -rw-r--r-- | keyboards/redox/rev1/proton_c/config.h | 66 | ||||
| -rw-r--r-- | keyboards/redox/rev1/proton_c/halconf.h | 8 | ||||
| -rw-r--r-- | keyboards/redox/rev1/proton_c/mcuconf.h | 9 | ||||
| -rw-r--r-- | keyboards/redox/rev1/proton_c/proton_c.c | 4 | ||||
| -rw-r--r-- | keyboards/redox/rev1/proton_c/proton_c.h | 6 | ||||
| -rw-r--r-- | keyboards/redox/rev1/proton_c/rules.mk | 7 |
6 files changed, 100 insertions, 0 deletions
diff --git a/keyboards/redox/rev1/proton_c/config.h b/keyboards/redox/rev1/proton_c/config.h new file mode 100644 index 000000000..4ec4a975a --- /dev/null +++ b/keyboards/redox/rev1/proton_c/config.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | // Copyright 2022 xerootg | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "config_common.h" | ||
| 7 | |||
| 8 | /* USB Device descriptor parameter */ | ||
| 9 | #undef DEVICE_VER | ||
| 10 | #define DEVICE_VER 0x0101 // added 1 for the rev1 + proton c | ||
| 11 | |||
| 12 | // wiring of each half | ||
| 13 | #undef MATRIX_ROW_PINS | ||
| 14 | #define MATRIX_ROW_PINS { B5, B3, B2, B1, B0 } | ||
| 15 | #undef MATRIX_COL_PINS | ||
| 16 | #define MATRIX_COL_PINS { A1, A0, B8, B13, B14, B15, B9 } | ||
| 17 | |||
| 18 | // //we are using hardware serial, so lets undef the softserial used otherwise | ||
| 19 | |||
| 20 | /* serial.c configuration for split keyboard */ | ||
| 21 | #define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. | ||
| 22 | /* | ||
| 23 | Because the rev1 config defines SOFT_SERIAL_PIN, we need to undef it, redefine it, and also assign | ||
| 24 | it to avoid a redefine error. | ||
| 25 | */ | ||
| 26 | #undef SOFT_SERIAL_PIN | ||
| 27 | #define SOFT_SERIAL_PIN B6 // USART TX pin | ||
| 28 | |||
| 29 | #define SERIAL_USART_RX_PIN B7 // USART RX pin | ||
| 30 | #define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN // USART TX pin | ||
| 31 | |||
| 32 | #define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. | ||
| 33 | // Check if this feature is necessary with your keyboard design and available on the mcu. | ||
| 34 | #define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5 | ||
| 35 | // 0: 460800 baud | ||
| 36 | // 1: 230400 baud (default) | ||
| 37 | // 2: 115200 baud | ||
| 38 | // 3: 57600 baud | ||
| 39 | // 4: 38400 baud | ||
| 40 | // 5: 19200 baud | ||
| 41 | #define SERIAL_USART_DRIVER SD1 // USART driver of TX and RX pin. default: SD1 | ||
| 42 | #define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 | ||
| 43 | #define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 | ||
| 44 | #define SERIAL_USART_TIMEOUT 20 // USART driver timeout. default 20 | ||
| 45 | |||
| 46 | /* ws2812 RGB LED */ | ||
| 47 | #undef RGB_DI_PIN | ||
| 48 | #define RGB_DI_PIN A9 | ||
| 49 | |||
| 50 | /* | ||
| 51 | * Feature disable options | ||
| 52 | * These options are also useful to firmware size reduction. | ||
| 53 | */ | ||
| 54 | |||
| 55 | /* disable debug print */ | ||
| 56 | // #define NO_DEBUG | ||
| 57 | |||
| 58 | /* disable print */ | ||
| 59 | // #define NO_PRINT | ||
| 60 | |||
| 61 | /* disable action features */ | ||
| 62 | //#define NO_ACTION_LAYER | ||
| 63 | //#define NO_ACTION_TAPPING | ||
| 64 | //#define NO_ACTION_ONESHOT | ||
| 65 | //#define NO_ACTION_MACRO | ||
| 66 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/redox/rev1/proton_c/halconf.h b/keyboards/redox/rev1/proton_c/halconf.h new file mode 100644 index 000000000..0a2498a62 --- /dev/null +++ b/keyboards/redox/rev1/proton_c/halconf.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | // Copyright 2022 xerootg | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #define HAL_USE_SERIAL TRUE | ||
| 7 | |||
| 8 | #include_next <halconf.h> \ No newline at end of file | ||
diff --git a/keyboards/redox/rev1/proton_c/mcuconf.h b/keyboards/redox/rev1/proton_c/mcuconf.h new file mode 100644 index 000000000..ba87dec13 --- /dev/null +++ b/keyboards/redox/rev1/proton_c/mcuconf.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | // Copyright 2022 xerootg | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include_next <mcuconf.h> | ||
| 7 | |||
| 8 | #undef STM32_SERIAL_USE_USART1 | ||
| 9 | #define STM32_SERIAL_USE_USART1 TRUE | ||
diff --git a/keyboards/redox/rev1/proton_c/proton_c.c b/keyboards/redox/rev1/proton_c/proton_c.c new file mode 100644 index 000000000..796e2c8c3 --- /dev/null +++ b/keyboards/redox/rev1/proton_c/proton_c.c | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | // Copyright 2022 xerootg | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "proton_c.h" | ||
diff --git a/keyboards/redox/rev1/proton_c/proton_c.h b/keyboards/redox/rev1/proton_c/proton_c.h new file mode 100644 index 000000000..d8813d9c4 --- /dev/null +++ b/keyboards/redox/rev1/proton_c/proton_c.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | // Copyright 2022 xerootg | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "rev1.h" | ||
diff --git a/keyboards/redox/rev1/proton_c/rules.mk b/keyboards/redox/rev1/proton_c/rules.mk new file mode 100644 index 000000000..829c8365e --- /dev/null +++ b/keyboards/redox/rev1/proton_c/rules.mk | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Proton C | ||
| 2 | MCU = STM32F303 | ||
| 3 | BOARD = QMK_PROTON_C | ||
| 4 | BOOTLOADER = stm32-dfu | ||
| 5 | |||
| 6 | # specific to using the serial serial driver | ||
| 7 | SERIAL_DRIVER = usart | ||
