#include <ADuCM360.h>

#include <hal/devices.h>
#include <applications/message.h>
#include <ctime>
#include <applications/dialog/Dialog.h>
#include <applications/dialog/SplashDialog.h>

int main(void)
{
	SystemCoreClockUpdate(); // SystemCoreClock in bss, cleared by _start

	initial_devices();

	SysTick_Config(SystemCoreClock / CLK_TCK); //system tick 100Hz = 10ms, defined in time.h

	p_dialog = &SplashDialog;
	p_dialog->OnCreat();

	while (true)
	{
		message_loop();
	}
}
