scheduler option.

This commit is contained in:
sorgelig
2019-11-26 12:41:14 +08:00
parent c7785fa2f0
commit 77c177bb97
3 changed files with 26 additions and 1 deletions

View File

@@ -67,8 +67,27 @@ int main(int argc, char *argv[])
FindStorage();
user_io_init((argc > 1) ? argv[1] : "");
#ifdef USE_SCHEDULER
scheduler_init();
scheduler_run();
#else
while (1)
{
if (!is_fpga_ready(1))
{
printf("FPGA is not ready. JTAG uploading?\n");
printf("Waiting for FPGA to be ready...\n");
//enable reset in advance
fpga_core_reset(1);
while (!is_fpga_ready(0)) sleep(1);
reboot(0);
}
user_io_poll();
input_poll(0);
HandleUI();
}
#endif
return 0;
}