/* USART MSP Initialization This function configures the hardware resources used in this example.  */
void HAL_USART_MspInit(USART_HandleTypeDef *husart)
/* USART MSP Initialization This function configures the hardware resources used in this example.  */
void HAL_USART_MspInit(USART_HandleTypeDef *husart)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  if(husart->Instance==USART1)
  {
    __HAL_RCC_USART1_CLK_ENABLE();
    __HAL_RCC_GPIOA_CLK_ENABLE();
    GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
    GPIO_InitStruct.Alternate = GPIO_AF1_USART1;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  }
}