aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorxerootg <xerootg@users.noreply.github.com>2022-01-31 12:40:13 -0700
committerGitHub <noreply@github.com>2022-01-31 11:40:13 -0800
commit1111ff604d1b006ffd29a0c52d7f717b7879cd00 (patch)
tree07ff78851c3c4f9c8ee45c6e8c59e4d509ccffc6 /keyboards
parent59ebe28cd5e50ffda700f127060f936c2d60ed0a (diff)
downloadqmk_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')
-rw-r--r--keyboards/redox/readme.md31
-rw-r--r--keyboards/redox/rev1/proton_c/config.h66
-rw-r--r--keyboards/redox/rev1/proton_c/halconf.h8
-rw-r--r--keyboards/redox/rev1/proton_c/mcuconf.h9
-rw-r--r--keyboards/redox/rev1/proton_c/proton_c.c4
-rw-r--r--keyboards/redox/rev1/proton_c/proton_c.h6
-rw-r--r--keyboards/redox/rev1/proton_c/rules.mk7
-rw-r--r--keyboards/redox/rev1/rev1.h7
8 files changed, 130 insertions, 8 deletions
diff --git a/keyboards/redox/readme.md b/keyboards/redox/readme.md
index d237caf01..27333b518 100644
--- a/keyboards/redox/readme.md
+++ b/keyboards/redox/readme.md
@@ -11,19 +11,38 @@
11**Redox**: the **R**educed **E**rgo**dox** project. More information and building instruction [here](https://github.com/mattdibi/redox-keyboard). 11**Redox**: the **R**educed **E**rgo**dox** project. More information and building instruction [here](https://github.com/mattdibi/redox-keyboard).
12 12
13- Keyboard Maintainer: [Mattia Dal Ben](https://github.com/mattdibi) 13- Keyboard Maintainer: [Mattia Dal Ben](https://github.com/mattdibi)
14- Hardware Supported: Redox PCB rev1.0 w/ Pro Micro 14- Hardware Supported: Redox PCB rev1.0 w/ Pro Micro or Proton C
15- Hardware Availability: [Falbatech](https://falba.tech/product-category/keyboard-parts/redox-parts/) 15- Hardware Availability: [Falbatech](https://falba.tech/product-category/keyboard-parts/redox-parts/)
16 16
17Make example for this keyboard (after setting up your build environment): 17Make example for this keyboard (after setting up [qmk](https://docs.qmk.fm/#/getting_started_build_tools)):
18 18
19To build the Pro Micro firmware, first set your config:
19```sh 20```sh
20make redox/rev1:default 21qmk config user.keyboard=redox/rev1
22```
23or if your using the Proton C:
24```sh
25qmk config user.keyboard=redox/rev1/proton_c
26```
27
28Don't forget to set a layout. There's many to choose from in the keymaps folder.
29```sh
30qmk config user.keymap=default
21``` 31```
22 32
23Example of flashing this keyboard: 33Now you can build your firmware!
34```sh
35qmk compile
36```
24 37
38Flashing is also straightforward. Run:
25```sh 39```sh
26make redox/rev1:default:avrdude 40qmk flash
27``` 41```
42Enter the bootloader when prompted by doing one of the following:
43* **Physical reset button**: Briefly press the button on the back of the PCB
44* **Keycode in layout**: Press the key mapped to `RESET` if you have a layout that has one.
45
46The WS2812 driver is *untested* on the Proton C, but if you choose to use this feature, you will need to source 5v from the Proton's VUSB pin and not use the PCB's dedicated pin which will be 3v3 *and* follow the [documentation](https://docs.qmk.fm/#/ws2812_driver) to enable the correct driver settings.
28 47
29See 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). 48Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
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
2MCU = STM32F303
3BOARD = QMK_PROTON_C
4BOOTLOADER = stm32-dfu
5
6# specific to using the serial serial driver
7SERIAL_DRIVER = usart
diff --git a/keyboards/redox/rev1/rev1.h b/keyboards/redox/rev1/rev1.h
index 1bc1531ee..5a2412204 100644
--- a/keyboards/redox/rev1/rev1.h
+++ b/keyboards/redox/rev1/rev1.h
@@ -1,9 +1,12 @@
1#pragma once 1#pragma once
2 2
3#include "../redox.h" 3#include "redox.h"
4 4
5#include "quantum.h" 5#if defined(KEYBOARD_redox_rev1_proton_c)
6# include "proton_c.h"
7#endif
6 8
9#include "quantum.h"
7 10
8#ifdef USE_I2C 11#ifdef USE_I2C
9#include <stddef.h> 12#include <stddef.h>