summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2024-02-20 11:34:24 +0100
committerGitHub <noreply@github.com>2024-02-20 11:34:24 +0100
commit61fa6949fbb537f54d48a4fc0218ff2b6873e940 (patch)
tree400f8f4920888097c0e22c68cb5fa742b0e340c8 /keyboards/handwired
parent865a8f42a6128dfc09a24fe749b0d78d8c69b70e (diff)
[Core] Allow ChibiOS `SIO` driver for `UART` driver (#22839)
* onekey: stm32f3_disco: add usart pins and activate peripheral Signed-off-by: Stefan Kerkmann <karlk90@pm.me> * chibios: uart: change SD1 prefix to UART Signed-off-by: Stefan Kerkmann <karlk90@pm.me> * chibios: uart: add SIO driver and RP2040 compatibility Signed-off-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Sergey Vlasov <sigprof@gmail.com> * Update platforms/chibios/drivers/uart.h Co-authored-by: Joel Challis <git@zvecr.com> --------- Signed-off-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Sergey Vlasov <sigprof@gmail.com> Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/config.h6
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/mcuconf.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/keyboards/handwired/onekey/stm32f3_disco/config.h b/keyboards/handwired/onekey/stm32f3_disco/config.h
index a0e3c54ec1..0927767772 100644
--- a/keyboards/handwired/onekey/stm32f3_disco/config.h
+++ b/keyboards/handwired/onekey/stm32f3_disco/config.h
@@ -4,3 +4,9 @@
#pragma once
#define ADC_PIN A0
+
+#define UART_TX_PIN C4
+#define UART_RX_PIN C5
+
+#define SERIAL_USART_TX_PIN C4
+#define SERIAL_USART_RX_PIN C4
diff --git a/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h b/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h
index 9172860b0f..520a5dc304 100644
--- a/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h
+++ b/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h
@@ -7,3 +7,9 @@
#undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE
+
+#undef STM32_SIO_USE_USART1
+#define STM32_SIO_USE_USART1 TRUE
+
+#undef STM32_SERIAL_USE_USART1
+#define STM32_SERIAL_USE_USART1 TRUE