#include "leds.h"

uint64_t lastLedTimer = 0;
bool ledBlinkState = false;

void initLeds(void)
{
  Serial.print("Init Leds: ");
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, ledBlinkState );
  lastLedTimer = millis();
  Serial.println("OK");
}

void handleLeds(void)
{
  uint64_t currentTime = millis();
  if(currentTime - lastLedTimer > LEDINTERVAL)
  {
    digitalWrite(LED_BUILTIN, ledBlinkState);
    ledBlinkState = !ledBlinkState;
    lastLedTimer = currentTime;
  } 
}