forked from mirrors/qmk_firmware
Corrections to uart driver for Chibios platform (#19075)
This commit is contained in:
parent
dfb28334e4
commit
aea1194ea3
2 changed files with 6 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue