X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/ead4a16614e0b46cf7e4f00feec1411067c1c6f4..c672ffeb5b298b4b8580e24916da2c80b2518ac2:/badge/init.c diff --git a/badge/init.c b/badge/init.c index 8a8983e..cc4d044 100644 --- a/badge/init.c +++ b/badge/init.c @@ -9,11 +9,11 @@ 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; + SCB_CLKOUTCLKDIV = 75; } void badge_init(void) { @@ -52,6 +52,12 @@ void badge_init(void) { 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();