コード例 #1
0
/*********************************************************************************************************//**
 * @brief Deinitialize registers of the USART peripheral by resetting USART.
 * @param USARTx: where USARTx is USART to select the USART peripheral, x can be 0 or 1.
 * @retval None
 ************************************************************************************************************/
void USART_DeInit(USART_TypeDef* USARTx)
{
  /* Check the parameters */
  Assert_Param(IS_USART(USARTx));

  if(USARTx == USART0)
  {
    RSTCU_APBPerip0Reset(RSTCU_APBRST0_USART0, ENABLE);
  }
  else
  {
    RSTCU_APBPerip0Reset(RSTCU_APBRST0_USART1, ENABLE);
  }
}
コード例 #2
0
ファイル: ht32f125x_usart.c プロジェクト: afxstar/Mplib
/*********************************************************************************************************//**
 * @brief Deinitialize registers of the USART peripheral by resetting USART.
 * @param USARTx: where USARTx is USART to select the USART peripheral.
 * @retval None
 ************************************************************************************************************/
void USART_DeInit(USART_TypeDef* USARTx)
{
  /* Check the parameters */
  Assert_Param(IS_USART(USARTx));

  RSTCU_APBPerip0Reset(RSTCU_APBRST0_USART, ENABLE);
}