summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_keyboard.mk4
-rw-r--r--docs/ja/proton_c_conversion.md1
-rw-r--r--docs/proton_c_conversion.md1
-rw-r--r--docs/serial_driver.md1
-rw-r--r--drivers/chibios/serial_usart.c13
-rw-r--r--keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk1
-rw-r--r--keyboards/acheron/shark/rules.mk1
-rw-r--r--keyboards/atreus/keymaps/ridingqwerty/rules.mk1
-rw-r--r--keyboards/boston_meetup/2019/rules.mk1
-rw-r--r--keyboards/c39/keymaps/drashna/rules.mk1
-rwxr-xr-xkeyboards/ckeys/thedora/rules.mk1
-rw-r--r--keyboards/clueboard/60/rules.mk1
-rw-r--r--keyboards/clueboard/66/rev4/rules.mk1
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/rules.mk1
-rw-r--r--keyboards/clueboard/california/rules.mk1
-rw-r--r--keyboards/dztech/dz60rgb/v1/rules.mk1
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v1/rules.mk1
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v1/rules.mk1
-rw-r--r--keyboards/dztech/dz65rgb/v1/rules.mk1
-rw-r--r--keyboards/hadron/ver3/rules.mk1
-rw-r--r--keyboards/handwired/co60/rev6/rules.mk1
-rw-r--r--keyboards/handwired/co60/rev7/rules.mk1
-rw-r--r--keyboards/handwired/d48/rules.mk1
-rw-r--r--keyboards/handwired/ddg_56/rules.mk1
-rw-r--r--keyboards/handwired/floorboard/rules.mk1
-rw-r--r--keyboards/handwired/onekey/blackpill_f401/chconf.h (renamed from platforms/chibios/BLACKPILL_STM32_F401/configs/chconf.h)0
-rw-r--r--keyboards/handwired/onekey/blackpill_f411/chconf.h (renamed from platforms/chibios/BLACKPILL_STM32_F411/configs/chconf.h)0
-rw-r--r--keyboards/handwired/onekey/proton_c/rules.mk1
-rw-r--r--keyboards/handwired/onekey/pytest/rules.mk1
-rw-r--r--keyboards/handwired/pill60/blackpill_f401/chconf.h714
-rw-r--r--keyboards/handwired/pill60/blackpill_f411/chconf.h714
-rw-r--r--keyboards/handwired/riblee_f401/chconf.h714
-rw-r--r--keyboards/handwired/riblee_f401/halconf.h (renamed from platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h)0
-rw-r--r--keyboards/handwired/riblee_f401/mcuconf.h253
-rw-r--r--keyboards/handwired/riblee_f411/chconf.h714
-rw-r--r--keyboards/handwired/selene/rules.mk1
-rw-r--r--keyboards/handwired/sick_pad/rules.mk1
-rw-r--r--keyboards/handwired/steamvan/rev1/rules.mk1
-rw-r--r--keyboards/handwired/wulkan/rules.mk1
-rw-r--r--keyboards/hs60/v2/ansi/rules.mk1
-rw-r--r--keyboards/hs60/v2/hhkb/rules.mk1
-rw-r--r--keyboards/hs60/v2/iso/rules.mk1
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk1
-rw-r--r--keyboards/kv/revt/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah60rgb/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah65/rules.mk1
-rw-r--r--keyboards/mechlovin/infinity87/rules.mk1
-rw-r--r--keyboards/mechlovin/infinity88/rules.mk1
-rw-r--r--keyboards/melgeek/mj61/rev1/rules.mk1
-rw-r--r--keyboards/melgeek/mj63/rev1/rules.mk1
-rw-r--r--keyboards/melgeek/mj64/rev1/rules.mk1
-rw-r--r--keyboards/melgeek/mj64/rev2/rules.mk1
-rw-r--r--keyboards/melgeek/mojo75/rev1/rules.mk1
-rw-r--r--keyboards/melgeek/z70ultra/rev1/rules.mk1
-rw-r--r--keyboards/moonlander/rules.mk1
-rw-r--r--keyboards/nack/rules.mk1
-rwxr-xr-xkeyboards/nebula68/rules.mk1
-rwxr-xr-xkeyboards/nk65/rules.mk1
-rwxr-xr-xkeyboards/nk87/rules.mk1
-rw-r--r--keyboards/planck/ez/rules.mk1
-rw-r--r--keyboards/planck/rev6/rules.mk1
-rw-r--r--keyboards/preonic/rev3/rules.mk1
-rw-r--r--keyboards/rgbkb/pan/rev1/proton_c/rules.mk1
-rw-r--r--keyboards/yugo_m/model_m_101/rules.mk1
-rw-r--r--platforms/chibios/GENERIC_STM32_F042X6/configs/config.h20
-rw-r--r--platforms/chibios/GENERIC_STM32_F072XB/configs/config.h20
-rw-r--r--platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h4
-rw-r--r--platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h22
-rw-r--r--platforms/chibios/QMK_PROTON_C/board/board.mk9
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/board.h37
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/bootloader_defs.h7
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/chconf.h714
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/config.h20
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/halconf.h (renamed from platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h)20
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/mcuconf.h273
-rw-r--r--platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk (renamed from platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk)7
-rw-r--r--platforms/chibios/common/configs/chconf.h20
-rw-r--r--platforms/chibios/common/configs/halconf.h18
-rw-r--r--quantum/quantum.h1
-rw-r--r--quantum/rgb_matrix.c6
-rw-r--r--quantum/rgblight.c21
-rw-r--r--quantum/split_common/transport.c26
-rw-r--r--readme.md6
-rw-r--r--tmk_core/chibios.mk3
-rw-r--r--tmk_core/common.mk1
-rw-r--r--tmk_core/common/keyboard.c2
-rw-r--r--tmk_core/common/sync_timer.c58
-rw-r--r--tmk_core/common/sync_timer.h54
-rwxr-xr-xutil/chibios_conf_updater.sh (renamed from util/chibios-upgrader.sh)10
90 files changed, 4492 insertions, 68 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index e87dcb8f22..8d018f2e3c 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -136,9 +136,7 @@ ifeq ($(strip $(CTPC)), yes)
endif
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
- TARGET := $(TARGET)_proton_c
- include platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk
- OPT_DEFS += -DCONVERT_TO_PROTON_C
+ include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
endif
ifneq ($(FORCE_LAYOUT),)
diff --git a/docs/ja/proton_c_conversion.md b/docs/ja/proton_c_conversion.md
index 6e4f7dcb66..e7c07413ce 100644
--- a/docs/ja/proton_c_conversion.md
+++ b/docs/ja/proton_c_conversion.md
@@ -51,6 +51,7 @@ Proton C には1つのオンボード LED(C13)しかなく、デフォルトで
```
MCU = STM32F303
+BOARD = QMK_PROTON_C
```
次の変数が存在する場合は削除します。
diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md
index 1b5e496e74..47511e1b1e 100644
--- a/docs/proton_c_conversion.md
+++ b/docs/proton_c_conversion.md
@@ -44,6 +44,7 @@ To use the Proton C natively, without having to specify `CTPC=yes`, you need to
```
MCU = STM32F303
+BOARD = QMK_PROTON_C
```
Remove these variables if they exist:
diff --git a/docs/serial_driver.md b/docs/serial_driver.md
index bc376b6ddd..c98f4c1176 100644
--- a/docs/serial_driver.md
+++ b/docs/serial_driver.md
@@ -60,6 +60,7 @@ Configure the hardware via your config.h:
// 5: about 19200 baud
#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_TIMEOUT 100 // USART driver timeout. default 100
```
You must also enable the ChibiOS `SERIAL` feature:
diff --git a/drivers/chibios/serial_usart.c b/drivers/chibios/serial_usart.c
index 62b4913cbf..72fcaed0c7 100644
--- a/drivers/chibios/serial_usart.c
+++ b/drivers/chibios/serial_usart.c
@@ -58,7 +58,10 @@
# error invalid SELECT_SOFT_SERIAL_SPEED value
#endif
-#define TIMEOUT 100
+#ifndef SERIAL_USART_TIMEOUT
+# define SERIAL_USART_TIMEOUT 100
+#endif
+
#define HANDSHAKE_MAGIC 7
static inline msg_t sdWriteHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size) {
@@ -201,21 +204,21 @@ int soft_serial_transaction(int index) {
sdClear(&SERIAL_USART_DRIVER);
// First chunk is always transaction id
- sdWriteTimeout(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index), TIME_MS2I(TIMEOUT));
+ sdWriteTimeout(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index), TIME_MS2I(SERIAL_USART_TIMEOUT));
uint8_t sstd_index_shake = 0xFF;
// Which we always read back first so that we can error out correctly
// - due to the half duplex limitations on return codes, we always have to read *something*
// - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready
- res = sdReadTimeout(&SERIAL_USART_DRIVER, &sstd_index_shake, sizeof(sstd_index_shake), TIME_MS2I(TIMEOUT));
+ res = sdReadTimeout(&SERIAL_USART_DRIVER, &sstd_index_shake, sizeof(sstd_index_shake), TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0 || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) {
dprintf("serial::usart_shake NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
}
if (trans->initiator2target_buffer_size) {
- res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(TIMEOUT));
+ res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0) {
dprintf("serial::usart_transmit NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
@@ -223,7 +226,7 @@ int soft_serial_transaction(int index) {
}
if (trans->target2initiator_buffer_size) {
- res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(TIMEOUT));
+ res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0) {
dprintf("serial::usart_receive NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk b/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk
index dedcf043af..6fb15f5a83 100644
--- a/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk
+++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
## Features
CONSOLE_ENABLE = yes
diff --git a/keyboards/acheron/shark/rules.mk b/keyboards/acheron/shark/rules.mk
index 1bd963c817..214c995ae9 100644
--- a/keyboards/acheron/shark/rules.mk
+++ b/keyboards/acheron/shark/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# change yes to no to disable
diff --git a/keyboards/atreus/keymaps/ridingqwerty/rules.mk b/keyboards/atreus/keymaps/ridingqwerty/rules.mk
index 5c89d5481d..ebf83f02e8 100644
--- a/keyboards/atreus/keymaps/ridingqwerty/rules.mk
+++ b/keyboards/atreus/keymaps/ridingqwerty/rules.mk
@@ -1,4 +1,5 @@
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# comment out to disable the options.
diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk
index aa35ba7539..9076d9ab4d 100644
--- a/keyboards/boston_meetup/2019/rules.mk
+++ b/keyboards/boston_meetup/2019/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# comment out to disable the options.
diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk
index 6ebd15a180..09c29f0e8f 100644
--- a/keyboards/c39/keymaps/drashna/rules.mk
+++ b/keyboards/c39/keymaps/drashna/rules.mk
@@ -1,4 +1,5 @@
MCU = STM32F303
+BOARD = QMK_PROTON_C
BOOTLOADER =
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
diff --git a/keyboards/ckeys/thedora/rules.mk b/keyboards/ckeys/thedora/rules.mk
index 92665ffb6d..8394b1a6cc 100755
--- a/keyboards/ckeys/thedora/rules.mk
+++ b/keyboards/ckeys/thedora/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# comment out to disable the options.
diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk
index a9151b87d2..87f56692f6 100644
--- a/keyboards/clueboard/60/rules.mk
+++ b/keyboards/clueboard/60/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# comment out to disable the options.
diff --git a/keyboards/clueboard/66/rev4/rules.mk b/keyboards/clueboard/66/rev4/rules.mk
index f8e4c07a47..f6120c929f 100644
--- a/keyboards/clueboard/66/rev4/rules.mk
+++ b/keyboards/clueboard/66/rev4/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# comment out to disable the options.
diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk
index 3667d63b76..c508ecbb54 100644
--- a/keyboards/clueboard/66_hotswap/gen1/rules.mk
+++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# LED Configuration
LED_MATRIX_ENABLE = yes
diff --git a/keyboards/clueboard/california/rules.mk b/keyboards/clueboard/california/rules.mk
index e96afd8135..11719015e9 100644
--- a/keyboards/clueboard/california/rules.mk
+++ b/keyboards/clueboard/california/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
## Features
MOUSEKEY_ENABLE = yes # Mouse keys
diff --git a/keyboards/dztech/dz60rgb/v1/rules.mk b/keyboards/dztech/dz60rgb/v1/rules.mk
index d71fb4c531..88207bc3f5 100644
--- a/keyboards/dztech/dz60rgb/v1/rules.mk
+++ b/keyboards/dztech/dz60rgb/v1/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# change yes to no to disable
diff --git a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk
index d71fb4c531..88207bc3f5 100644
--- a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk
+++ b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk
@@ -1,5 +1,6 @@
# MCU name
MCU = STM32F303
+BOARD = QMK_PROTON_C
# Build Options
# change yes to no to disable
diff --git a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk
index 9dfe170032..426769e248 100644
--- a/