From 83de8b2ba223b51c124aac4c31985eb13c6f5048 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 26 Jul 2018 20:27:53 +0800 Subject: [PATCH] drtio: add ping timeout during link init --- artiq/firmware/runtime/rtio_mgt.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/firmware/runtime/rtio_mgt.rs b/artiq/firmware/runtime/rtio_mgt.rs index 814c021e2..effa1db5e 100644 --- a/artiq/firmware/runtime/rtio_mgt.rs +++ b/artiq/firmware/runtime/rtio_mgt.rs @@ -101,6 +101,9 @@ pub mod drtio { return 0 } count += 1; + if count > 200 { + return 0; + } drtioaux::send_link(linkno, &drtioaux::Packet::EchoRequest).unwrap(); io.sleep(100).unwrap(); let pr = drtioaux::recv_link(linkno);