diff --git a/f4/usart/src/usart4.c b/f4/usart/src/usart4.c index e97a9c7b0bc3472a1446ee5b1e5506cf2532c14a..12413be95528c422f84d7de56fee0f3852b3b90a 100644 --- a/f4/usart/src/usart4.c +++ b/f4/usart/src/usart4.c @@ -1,9 +1,9 @@ #include "usart4.h" -#define USART USART4 -#define USART_ENABLE_CLK __HAL_RCC_USART4_CLK_ENABLE() -#define USART_IRQn USART4_IRQn -#define USART_IRQHandler USART4_IRQHandler +#define USART UART4 +#define USART_ENABLE_CLK __HAL_RCC_UART4_CLK_ENABLE() +#define USART_IRQn UART4_IRQn +#define USART_IRQHandler UART4_IRQHandler #define USART_TX_PIN GPIO_PIN_10 #define USART_TX_GPIO_PORT GPIOC @@ -182,8 +182,8 @@ void usart4_init(TComm *comm_dev,UART_InitTypeDef *conf,TUSART_IRQ_Priorities *p GPIO_InitStructure.Pin = USART_TX_PIN; GPIO_InitStructure.Mode = GPIO_MODE_AF_PP; GPIO_InitStructure.Pull = GPIO_PULLUP; - GPIO_InitStructure.Speed = GPIO_SPEED_LOW; - GPIO_InitStructure.Alternate = GPIO_AF7_USART4; + GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStructure.Alternate = GPIO_AF8_UART4; HAL_GPIO_Init(USART_TX_GPIO_PORT, &GPIO_InitStructure); GPIO_InitStructure.Pin = USART_RX_PIN;