fpga_io: reboot ASAP if USB Blaster loading is detected.

This commit is contained in:
sorgelig
2020-08-20 17:33:34 +08:00
parent 419ae67dee
commit 141c0bedae
4 changed files with 20 additions and 18 deletions

View File

@@ -76,13 +76,7 @@ int main(int argc, char *argv[])
{
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);
fpga_wait_to_reset();
}
user_io_poll();