2019-09-07 19:47:43 +00:00
|
|
|
#include <stm32f37x_conf.h>
|
2019-08-30 11:07:08 +00:00
|
|
|
|
2020-02-26 23:22:01 +00:00
|
|
|
#include "midi2cv/drivers/eco_display.h"
|
2019-08-30 11:07:08 +00:00
|
|
|
#include "stmlib/system/bootloader_utils.h"
|
2020-02-25 20:54:49 +00:00
|
|
|
#include "stmlib/system/system_clock.h"
|
2020-02-25 20:48:04 +00:00
|
|
|
#include <U8x8lib.h>
|
2019-08-30 11:07:08 +00:00
|
|
|
|
|
|
|
using namespace stmlib;
|
|
|
|
|
2020-02-26 23:22:01 +00:00
|
|
|
extern "C" void __cxa_pure_virtual()
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2020-02-25 20:54:49 +00:00
|
|
|
extern "C" {
|
2020-02-26 23:22:01 +00:00
|
|
|
void SysTick_Handler()
|
|
|
|
{
|
|
|
|
system_clock.Tick();
|
|
|
|
}
|
2020-02-25 20:54:49 +00:00
|
|
|
}
|
|
|
|
|
2019-09-19 14:41:32 +00:00
|
|
|
const uint32_t kStartAddress = 0x08008000;
|
2019-08-30 11:07:08 +00:00
|
|
|
|
2020-02-25 20:48:04 +00:00
|
|
|
EcoDisplay display;
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2019-08-30 11:07:08 +00:00
|
|
|
SystemInit();
|
2020-02-25 20:48:04 +00:00
|
|
|
|
2020-02-25 20:54:49 +00:00
|
|
|
SysTick_Config(F_CPU / 1000);
|
|
|
|
|
|
|
|
system_clock.Init();
|
|
|
|
|
2020-02-25 20:48:04 +00:00
|
|
|
display.Init();
|
|
|
|
|
2020-02-25 21:05:06 +00:00
|
|
|
display.u8x8()->setFont(u8x8_font_5x7_f);
|
|
|
|
display.u8x8()->drawString(0, 0, "RolfOS 1.0");
|
2020-02-26 23:22:01 +00:00
|
|
|
system_clock.Delay(20);
|
2020-02-25 21:05:06 +00:00
|
|
|
display.u8x8()->drawString(0, 2, "Display ready");
|
2020-02-26 23:22:01 +00:00
|
|
|
system_clock.Delay(50);
|
2020-02-25 21:05:06 +00:00
|
|
|
display.u8x8()->drawString(0, 3, "Ehre ready");
|
2020-02-26 23:22:01 +00:00
|
|
|
system_clock.Delay(50);
|
2020-02-25 21:05:06 +00:00
|
|
|
display.u8x8()->drawString(0, 5, "let's fetz");
|
2020-02-26 23:22:01 +00:00
|
|
|
system_clock.Delay(100);
|
2020-02-25 20:54:49 +00:00
|
|
|
|
2019-08-30 11:07:08 +00:00
|
|
|
Uninitialize();
|
|
|
|
JumpTo(kStartAddress);
|
2019-08-29 15:43:30 +00:00
|
|
|
}
|