aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2015-11-10 17:35:48 -0500
committerPaul Selkirk <paul@psgd.org>2015-11-10 17:35:48 -0500
commitdf8f45c0d06e64b3901f1cce4e74cbde038737f2 (patch)
tree122c08b5fddab70e414786193c36ef392bc645f6 /main.c
parenta15bc4b09f6646a2547da3f4bdd30cb29b39abde (diff)
We really do need that delay before initializing FMC while Novena is booting.
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/main.c b/main.c
index 2572927..6d19a7e 100644
--- a/main.c
+++ b/main.c
@@ -3,15 +3,28 @@
*/
#include "stm-init.h"
+#include "stm-led.h"
#include "stm-fmc.h"
#include "stm-uart.h"
extern void __main(void);
-void main(void)
+int main(void)
{
stm_init();
+
+ // Blink blue LED for six seconds to not upset the Novena at boot.
+ led_on(LED_BLUE);
+ for (int i = 0; i < 12; i++) {
+ HAL_Delay(500);
+ led_toggle(LED_BLUE);
+ }
fmc_init();
+ led_off(LED_BLUE);
+ led_on(LED_GREEN);
+
__main();
+
uart_send_string("Done.\r\n\r\n");
+ return 0;
}