/** 
 * \file main.c
 * \brief Main function with initialization
 *
 * \author Juraj Golej
 * \version 1.0
 */

#include <drivers/timer/timer.h>
#include <app/lcd/lcd.h>
#include <image_vut.h>
#include "init.h"
#include "machine.h"

extern struct TIMER_module timer_ms;

int main(void)
{	
	/* System init */
    SystemInit();
	StartupInit();

	/* Show logo and wait 2s */
	LCD_setGraphicMode();
	LCD_show_image(image_vut);

	TIMER_setInterval(&timer_ms, 1000000);
	TIMER_start(&timer_ms, TIMER_MODE_SINGLE);
	while(TIMER_isBusy(&timer_ms));

	/* Init is done, go to machine code */
	Machine();

	return 0;
}