static void badge_init_backlight(void) {
HOB_SET_PIN_FUNC(HOB_LCD_BACKLIGHT, CLKOUT);
- // wdtInit(false);
- SCB_CLKOUTCLKSEL = SCB_MAINCLKSEL_SOURCE_INTERNALOSC;
+ wdtInit(false);
+ SCB_CLKOUTCLKSEL = SCB_MAINCLKSEL_SOURCE_WDTOSC;
SCB_CLKOUTCLKUEN = SCB_CLKOUTCLKUEN_DISABLE;
SCB_CLKOUTCLKUEN = SCB_CLKOUTCLKUEN_UPDATE;
SCB_CLKOUTCLKDIV = 30;
OUTPUT_PIN_CONFIG(HOB_LCD_CS , 1);
OUTPUT_PIN_CONFIG(HOB_LCD_RST , 1);
OUTPUT_PIN_CONFIG(HOB_DATAFLASH_CS, 1);
+
+#ifdef HOB_REV2
+ OUTPUT_PIN_CONFIG(HOB_LED_LEFT , 0);
+ OUTPUT_PIN_CONFIG(HOB_LED_RIGHT , 0);
+#endif
+
#undef OUTPUT_PIN_CONFIG
badge_init_backlight();
#include "drivers/fatfs/ff.h"
+#include "badge/pinconfig.h"
+
#ifdef R0KET
#include "r0ketports.h"
badge_init();
#endif
+#ifdef HOB_REV2
+ gpioSetValue(HOB_PORT(HOB_LED_LEFT), HOB_PIN(HOB_LED_LEFT), 1);
+ systickDelay(1000);
+ gpioSetValue(HOB_PORT(HOB_LED_RIGHT), HOB_PIN(HOB_LED_RIGHT), 1);
+#endif
+
{
// f_mkfs(0, 1, 0);
badge_framebuffer fb;
#define HOB_USB_CONNECT (0, 6)
+#define HOB_LED_LEFT (2, 8)
+#define HOB_LED_RIGHT (2, 6)
+
#else
#define HOB_BTN_UP (3, 2)