/* Enable/disable LEUART receiver and/or transmitter. 
Notice that this function does not do any configuration. Enabling should normally be done after initialization is done (if not enabled as part of init). */
void LEUART_Enable(LEUART_TypeDef *leuart, LEUART_Enable_TypeDef enable)
/* Enable/disable LEUART receiver and/or transmitter. 
Notice that this function does not do any configuration. Enabling should normally be done after initialization is done (if not enabled as part of init). */
void LEUART_Enable(LEUART_TypeDef *leuart, LEUART_Enable_TypeDef enable)
{
  uint32_t tmp;
  EFM_ASSERT(LEUART_REF_VALID(leuart));
  tmp   = ~((uint32_t)(enable));
  tmp  &= (_LEUART_CMD_RXEN_MASK | _LEUART_CMD_TXEN_MASK);
  tmp <<= 1;
  tmp |= (uint32_t)(enable);
  LEUART_Sync(leuart, LEUART_SYNCBUSY_CMD);
  leuart->CMD = tmp;
}