summaryrefslogtreecommitdiff
path: root/platforms/chibios/boards
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/boards')
-rw-r--r--platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h28
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h8
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h14
-rw-r--r--platforms/chibios/boards/QMK_BLOK/configs/config.h24
-rw-r--r--platforms/chibios/boards/QMK_PM2040/configs/config.h24
5 files changed, 96 insertions, 2 deletions
diff --git a/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h b/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h
index 9209e99e76..73c2b40f46 100644
--- a/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h
+++ b/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h
@@ -1,4 +1,4 @@
-// Copyright 2022 Stefan Kerkmann
+// Copyright 2024 Stefan Kerkmann
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -56,7 +56,31 @@
#endif
/**======================
+ ** UART Driver
+ *========================**/
+
+#if !defined(UART_DRIVER)
+# define UART_DRIVER SIOD0
+#endif
+
+#if !defined(UART_TX_PIN)
+# define UART_TX_PIN GP0
+#endif
+
+#if !defined(UART_RX_PIN)
+# define UART_RX_PIN GP1
+#endif
+
+#if !defined(UART_CTS_PIN)
+# define UART_CTS_PIN GP2
+#endif
+
+#if !defined(UART_RTS_PIN)
+# define UART_RTS_PIN GP3
+#endif
+
+/**======================
** Double-tap
*========================**/
-#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
diff --git a/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h
new file mode 100644
index 0000000000..15d7fbec0b
--- /dev/null
+++ b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h
@@ -0,0 +1,8 @@
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+// TODO: Remove when upstream no longer requires patching
+#include <stm32_registry.h>
+
+#include_next <hal_lld.h>
diff --git a/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h
new file mode 100644
index 0000000000..766df5a78e
--- /dev/null
+++ b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h
@@ -0,0 +1,14 @@
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+// TODO: Remove when STM32_FLASH_SECTORS_PER_BANK fixed upstream
+#ifndef STM32_FLASH_SECTORS_PER_BANK
+# define STM32_FLASH_SECTORS_PER_BANK 64
+#endif
+
+#include_next <stm32_registry.h>
+
+// TODO: Remove when STM32_FLASH_NUMBER_OF_BANKS fixed upstream
+#undef STM32_FLASH_NUMBER_OF_BANKS
+#define STM32_FLASH_NUMBER_OF_BANKS 1
diff --git a/platforms/chibios/boards/QMK_BLOK/configs/config.h b/platforms/chibios/boards/QMK_BLOK/configs/config.h
index 168afb1fc4..834dc497d3 100644
--- a/platforms/chibios/boards/QMK_BLOK/configs/config.h
+++ b/platforms/chibios/boards/QMK_BLOK/configs/config.h
@@ -3,6 +3,10 @@
#pragma once
+/**======================
+ ** I2C Driver
+ *========================**/
+
#ifndef I2C_DRIVER
# define I2C_DRIVER I2CD0
#endif
@@ -13,6 +17,26 @@
# define I2C1_SCL_PIN D0
#endif
+/**======================
+ ** UART Driver
+ *========================**/
+
+#ifndef UART_DRIVER
+# define UART_DRIVER SIOD0
+#endif
+
+#ifndef UART_TX_PIN
+# define UART_TX_PIN D3
+#endif
+
+#ifndef UART_RX_PIN
+# define UART_RX_PIN D2
+#endif
+
+/**======================
+ ** Double-tap
+ *========================**/
+
#ifndef RP2040_BOOTLOADER_DOUBLE_TAP_RESET
# define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#endif
diff --git a/platforms/chibios/boards/QMK_PM2040/configs/config.h b/platforms/chibios/boards/QMK_PM2040/configs/config.h
index ec85ae0cf4..f8b46b7fe4 100644
--- a/platforms/chibios/boards/QMK_PM2040/configs/config.h
+++ b/platforms/chibios/boards/QMK_PM2040/configs/config.h
@@ -3,6 +3,10 @@
#pragma once
+/**======================
+ ** I2C Driver
+ *========================**/
+
#ifndef I2C_DRIVER
# define I2C_DRIVER I2CD1
#endif
@@ -13,6 +17,26 @@
# define I2C1_SCL_PIN D0
#endif
+/**======================
+ ** UART Driver
+ *========================**/
+
+#ifndef UART_DRIVER
+# define UART_DRIVER SIOD0
+#endif
+
+#ifndef UART_TX_PIN
+# define UART_TX_PIN D3
+#endif
+
+#ifndef UART_RX_PIN
+# define UART_RX_PIN D2
+#endif
+
+/**======================
+ ** Double-tap
+ *========================**/
+
#ifndef RP2040_BOOTLOADER_DOUBLE_TAP_RESET
# define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#endif