RT-Thread Studio stm32f1使能5个串口

#define BSP_USING_UART1
#define BSP_USING_UART2
#define BSP_USING_UART3
#define BSP_USING_UART4
#define BSP_USING_UART5


#if defined(BSP_USING_UART1)
#define UART1_TX_PORT       GPIOA
#define UART1_RX_PORT       GPIOA
#define UART1_TX_PIN        GPIO_PIN_9
#define UART1_RX_PIN        GPIO_PIN_10
#endif
#if defined(BSP_USING_UART2)
#define UART2_TX_PORT       GPIOA
#define UART2_RX_PORT       GPIOA
#define UART2_TX_PIN        GPIO_PIN_2
#define UART2_RX_PIN        GPIO_PIN_3
#endif
#if defined(BSP_USING_UART3)
#define UART3_TX_PORT       GPIOB
#define UART3_RX_PORT       GPIOB
#define UART3_TX_PIN        GPIO_PIN_10
#define UART3_RX_PIN        GPIO_PIN_11
#endif
#if defined(BSP_USING_UART4)
#define UART4_TX_PORT       GPIOC
#define UART4_RX_PORT       GPIOC
#define UART4_TX_PIN        GPIO_PIN_10
#define UART4_RX_PIN        GPIO_PIN_11
#endif
#if defined(BSP_USING_UART5)
#define UART5_TX_PORT       GPIOC
#define UART5_RX_PORT       GPIOD
#define UART5_TX_PIN        GPIO_PIN_12
#define UART5_RX_PIN        GPIO_PIN_2
#endif

你可能感兴趣的:(rt-thread)