-#include "r0ketports.h"
-#include "drivers/fatfs/ff.h"
-
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof*(arr))
-
-void backlightInit(void) {
-#if HW_IS_PROTOTYPE
-
-
- // prototype uses WDT CLKOUT to drive the LCD backlight
- // init without a reset
-
- IOCON_PIO0_1 &= ~(IOCON_PIO0_1_FUNC_MASK);
- IOCON_PIO0_1 |= IOCON_PIO0_1_FUNC_CLKOUT;
-
- wdtInit(false);
-
- // use the WDT clock as the default WDT frequency is best frequency
- // XXX this register value is missing in lpc1343.h
-#define SCB_CLKOUTCLKSEL_SOURCE_WDTCLOCK ((unsigned int) 0x00000002) // Use the WDT clock
-
- SCB_CLKOUTCLKSEL = SCB_CLKOUTCLKSEL_SOURCE_WDTCLOCK;
-
- // toggle from LOW to HIGH to update source
- SCB_CLKOUTCLKUEN = SCB_CLKOUTCLKUEN_DISABLE;
- SCB_CLKOUTCLKUEN = SCB_CLKOUTCLKUEN_UPDATE;
-
- // divide by 30, to get almost 10 kHz
- SCB_CLKOUTCLKDIV = 30;