/*
 * Copyright (c) 2022-2023, Erich Styger
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include "platform.h"
#include "McuLib.h"
#include "McuGPIO.h"
#include "McuLED.h"
#include "McuWait.h"
#include "McuArmTools.h"
#include "McuRTT.h"
#include "McuSystemView.h"
#include "leds.h"
#include "fsl_iap.h"

void PL_Init(void) {
  CLOCK_EnableClock(kCLOCK_Iocon);

  /* McuLib modules */
  McuLib_Init();
  McuGPIO_Init();
  McuLED_Init();
  McuWait_Init(); /* note: flash access time is 2 cycles! divide the time by two */
  McuArmTools_Init();
  McuRTT_Init();
#if configUSE_SEGGER_SYSTEM_VIEWER_HOOKS
  McuSystemView_Init();
#endif

  /* application modules */
  LEDS_Init();
}
