summaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorDavid Hoelscher <infinityis@users.noreply.github.com>2023-01-23 14:05:47 -0600
committerGitHub <noreply@github.com>2023-01-24 07:05:47 +1100
commitaea1194ea33fe85a8bdc380bd2cb27d3c3d6078a (patch)
treef97172241e2550047036c729d2d6835bcb45ec87 /platforms
parentdfb28334e4c14f07e9cc9dee323117fcb39facae (diff)
Corrections to uart driver for Chibios platform (#19075)
Diffstat (limited to 'platforms')
-rw-r--r--platforms/chibios/drivers/uart.c4
-rw-r--r--platforms/chibios/drivers/uart.h11
2 files changed, 6 insertions, 9 deletions
diff --git a/platforms/chibios/drivers/uart.c b/platforms/chibios/drivers/uart.c
index b16130d80b..34f77232b6 100644
--- a/platforms/chibios/drivers/uart.c
+++ b/platforms/chibios/drivers/uart.c
@@ -42,8 +42,8 @@ void uart_init(uint32_t baud) {
palSetLineMode(SD1_TX_PIN, SD1_TX_PAL_MODE);
palSetLineMode(SD1_RX_PIN, SD1_RX_PAL_MODE);
#else
- palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE(SD1_TX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN);
- palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE(SD1_RX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN);
+ palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE(SD1_TX_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
+ palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE(SD1_RX_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
#endif
sdStart(&SERIAL_DRIVER, &serialConfig);
}
diff --git a/platforms/chibios/drivers/uart.h b/platforms/chibios/drivers/uart.h
index db97840270..e9e3b0855b 100644
--- a/platforms/chibios/drivers/uart.h
+++ b/platforms/chibios/drivers/uart.h
@@ -42,19 +42,16 @@
#ifdef USE_GPIOV1
# ifndef SD1_TX_PAL_MODE
-# define SD1_TX_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
+# define SD1_TX_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
# endif
-
# ifndef SD1_RX_PAL_MODE
-# define SD1_RX_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
+# define SD1_RX_PAL_MODE PAL_MODE_INPUT
# endif
-
# ifndef SD1_CTS_PAL_MODE
-# define SD1_CTS_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
+# define SD1_CTS_PAL_MODE PAL_MODE_INPUT
# endif
-
# ifndef SD1_RTS_PAL_MODE
-# define SD1_RTS_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
+# define SD1_RTS_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
# endif
#else
# ifndef SD1_TX_PAL_MODE