Skip to content

Commit ed574f6

Browse files
MuChengerRbb666
authored andcommitted
[fix] 修正UART驱动管脚配置不正确的问题
1 parent 233cbaa commit ed574f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bsp/gd32/arm/libraries/gd32_drivers/drv_usart.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,6 @@ static const struct gd32_uart uart_obj[] = {
554554
GPIOC, GPIO_AF_8, GPIO_PIN_6, /* tx port, tx alternate, tx pin */
555555
GPIOC, GPIO_AF_8, GPIO_PIN_7, /* rx port, rx alternate, rx pin */
556556
#elif defined (SOC_SERIES_GD32H7xx)
557-
GPIOC, GPIO_AF_7, GPIO_PIN_6, // tx port, tx alternate, tx pin
558557
GPIOC, GPIO_AF_7, GPIO_PIN_6, /* tx port, tx alternate, tx pin */
559558
GPIOC, GPIO_AF_7, GPIO_PIN_7, /* rx port, rx alternate, rx pin */
560559
#elif defined SOC_SERIES_GD32E50x
@@ -602,8 +601,8 @@ static const struct gd32_uart uart_obj[] = {
602601
UART7_IRQn, /* uart iqrn */
603602
RCU_UART7, RCU_GPIOE, RCU_GPIOE, /* periph clock, tx gpio clock, rt gpio clock */
604603
#if defined SOC_SERIES_GD32F4xx || defined SOC_SERIES_GD32F5xx || defined SOC_SERIES_GD32H7xx
605-
GPIOE, GPIO_AF_8, GPIO_PIN_0, /* tx port, tx alternate, tx pin */
606-
GPIOE, GPIO_AF_8, GPIO_PIN_1, /* rx port, rx alternate, rx pin */
604+
GPIOE, GPIO_AF_8, GPIO_PIN_1, /* tx port, tx alternate, tx pin */
605+
GPIOE, GPIO_AF_8, GPIO_PIN_0, /* rx port, rx alternate, rx pin */
607606
#else
608607
GPIOE, GPIO_PIN_0, /* tx port, tx pin */
609608
GPIOE, GPIO_PIN_1, /* rx port, rx pin */

0 commit comments

Comments
 (0)