/* Reset LEUART to same state as after a HW reset.  */
void LEUART_Reset(LEUART_TypeDef *leuart)
/* Reset LEUART to same state as after a HW reset.  */
void LEUART_Reset(LEUART_TypeDef *leuart)
{
  EFM_ASSERT(LEUART_REF_VALID(leuart));
  LEUART_FreezeEnable(leuart, true);
  leuart->CMD = LEUART_CMD_RXDIS | LEUART_CMD_TXDIS | LEUART_CMD_RXBLOCKDIS |
                LEUART_CMD_CLEARTX | LEUART_CMD_CLEARRX;
  leuart->CTRL       = _LEUART_CTRL_RESETVALUE;
  leuart->CLKDIV     = _LEUART_CLKDIV_RESETVALUE;
  leuart->STARTFRAME = _LEUART_STARTFRAME_RESETVALUE;
  leuart->SIGFRAME   = _LEUART_SIGFRAME_RESETVALUE;
  leuart->IEN        = _LEUART_IEN_RESETVALUE;
  leuart->IFC        = _LEUART_IFC_MASK;
  leuart->PULSECTRL  = _LEUART_PULSECTRL_RESETVALUE;
  leuart->ROUTE      = _LEUART_ROUTE_RESETVALUE;
  LEUART_FreezeEnable(leuart, false);
}