/* Reset LETIMER to same state as after a HW reset.  */
void LETIMER_Reset(LETIMER_TypeDef *letimer)
/* Reset LETIMER to same state as after a HW reset.  */
void LETIMER_Reset(LETIMER_TypeDef *letimer)
{
  LETIMER_FreezeEnable(letimer, true);
  letimer->CMD = LETIMER_CMD_STOP | LETIMER_CMD_CLEAR |
                 LETIMER_CMD_CTO0 | LETIMER_CMD_CTO1;
  letimer->CTRL  = _LETIMER_CTRL_RESETVALUE;
  letimer->COMP0 = _LETIMER_COMP0_RESETVALUE;
  letimer->COMP1 = _LETIMER_COMP1_RESETVALUE;
  letimer->REP0  = _LETIMER_REP0_RESETVALUE;
  letimer->REP1  = _LETIMER_REP1_RESETVALUE;
  letimer->IEN   = _LETIMER_IEN_RESETVALUE;
  letimer->IFC   = _LETIMER_IFC_MASK;
  LETIMER_FreezeEnable(letimer, false);
}