2011-05-21 00:53:09 +02:00
|
|
|
#include <sysinit.h>
|
2011-05-11 23:24:05 +02:00
|
|
|
|
2011-07-18 18:25:14 +02:00
|
|
|
#include "core/cpu/cpu.h"
|
|
|
|
#include "core/pmu/pmu.h"
|
2011-05-21 01:12:09 +02:00
|
|
|
|
2011-07-18 18:25:14 +02:00
|
|
|
#include "basic/basic.h"
|
2011-05-21 00:53:09 +02:00
|
|
|
#include "lcd/render.h"
|
2011-08-01 05:22:24 +02:00
|
|
|
#include "filesystem/ff.h"
|
2011-05-11 23:24:05 +02:00
|
|
|
|
2011-08-05 16:13:14 +02:00
|
|
|
__attribute__ ((used, section("crp"))) const uint32_t the_crp=0x87654321;
|
|
|
|
|
2011-05-21 00:53:09 +02:00
|
|
|
/**************************************************************************/
|
2011-05-11 23:24:05 +02:00
|
|
|
|
2011-05-21 12:05:48 +02:00
|
|
|
void wrapper(void);
|
|
|
|
|
2011-05-21 00:53:09 +02:00
|
|
|
int main(void) {
|
|
|
|
// Configure cpu and mandatory peripherals
|
2011-07-09 22:13:46 +02:00
|
|
|
cpuInit(); // Configure the CPU
|
|
|
|
// we do it later
|
|
|
|
// systickInit(CFG_SYSTICK_DELAY_IN_MS); // Start systick timer
|
|
|
|
// cpuInit already calls this
|
|
|
|
// gpioInit(); // Enable GPIO
|
|
|
|
pmuInit(); // Configure power management
|
|
|
|
adcInit(); // Config adc pins to save power
|
2011-05-11 23:24:05 +02:00
|
|
|
|
2011-05-21 00:53:09 +02:00
|
|
|
// initialise basic badge functions
|
|
|
|
rbInit();
|
2011-07-27 00:57:36 +02:00
|
|
|
|
|
|
|
fsInit();
|
2011-05-21 00:53:09 +02:00
|
|
|
|
2011-05-21 01:12:09 +02:00
|
|
|
lcdInit(); // display
|
2011-05-11 23:24:05 +02:00
|
|
|
|
2011-05-21 03:05:57 +02:00
|
|
|
lcdFill(0);
|
2011-07-18 22:09:31 +02:00
|
|
|
lcdDisplay();
|
2011-05-11 23:24:05 +02:00
|
|
|
|
2011-05-21 12:05:48 +02:00
|
|
|
wrapper(); // see module/ subdirectory
|
2011-05-11 23:24:05 +02:00
|
|
|
}
|