/* UART MSP De-Initialization This function freeze the hardware resources used in this example.  */
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
/* UART MSP De-Initialization This function freeze the hardware resources used in this example.  */
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
{
  if(huart->Instance==LPUART1)
  {
    __HAL_RCC_LPUART1_CLK_DISABLE();
    HAL_GPIO_DeInit(GPIOG, ARD_D0_Pin|ARD_D1_Pin);
  }
  else if(huart->Instance==USART1)
  {
    __HAL_RCC_USART1_CLK_DISABLE();
    HAL_GPIO_DeInit(USART1_TX_GPIO_Port, USART1_TX_Pin);
    HAL_GPIO_DeInit(GPIOG, UART1_RX_Pin|UART1_CTS_Pin|UART1_RTS_Pin);
  }
  else if(huart->Instance==USART2)
  {
    __HAL_RCC_USART2_CLK_DISABLE();
    HAL_GPIO_DeInit(USART2_RX_GPIO_Port, USART2_RX_Pin);
    HAL_GPIO_DeInit(USART2_TX_GPIO_Port, USART2_TX_Pin);
  }
}