mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Review application initialization order.
Group related things together.
This commit is contained in:
parent
49b91d9c5d
commit
f2cabadf60
@ -230,20 +230,13 @@ int main(void) {
|
||||
chSysHalt();
|
||||
}
|
||||
|
||||
init_message_queues();
|
||||
|
||||
portapack::io.init();
|
||||
portapack::display.init();
|
||||
|
||||
sdcStart(&SDCD1, nullptr);
|
||||
|
||||
rtc_interrupt_enable();
|
||||
|
||||
controls_init();
|
||||
|
||||
lcd_frame_sync_configure();
|
||||
|
||||
events_initialize(chThdSelf());
|
||||
init_message_queues();
|
||||
|
||||
ui::Context context;
|
||||
ui::SystemView system_view {
|
||||
@ -253,10 +246,13 @@ int main(void) {
|
||||
ui::Painter painter;
|
||||
EventDispatcher event_dispatcher { &system_view, painter, context };
|
||||
|
||||
m4txevent_interrupt_enable();
|
||||
|
||||
m4_init(portapack::spi_flash::baseband, portapack::spi_flash::m4_text_ram_base);
|
||||
|
||||
controls_init();
|
||||
lcd_frame_sync_configure();
|
||||
rtc_interrupt_enable();
|
||||
m4txevent_interrupt_enable();
|
||||
|
||||
event_dispatcher.run();
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user