/* Toggles the LED at a fixed time interval.  */
void LedToggle(void)
/* Toggles the LED at a fixed time interval.  */
void LedToggle(void)
{
  static unsigned char led_toggle_state = 0;
  static unsigned long timer_counter_last = 0;
  unsigned long timer_counter_now;
  timer_counter_now = TimerGet();
  if ( (timer_counter_now - timer_counter_last) < LED_TOGGLE_MS)
  {
    return;
  }
  if (led_toggle_state == 0)
  {
    led_toggle_state = 1;
    HAL_GPIO_WritePin(GPIOE, GPIO_PIN_8, GPIO_PIN_SET);
  }
  else
  {
    led_toggle_state = 0;
    HAL_GPIO_WritePin(GPIOE, GPIO_PIN_8, GPIO_PIN_RESET);
  }
  timer_counter_last = timer_counter_now;
}