forked from M-Labs/artiq-zynq
satman: fixed timeout millisecond/u64 mismatch
This commit is contained in:
parent
be0baf5da8
commit
db9b744825
|
@ -20,7 +20,7 @@ fn rep_link_rx_up(repno: u8) -> bool {
|
||||||
enum RepeaterState {
|
enum RepeaterState {
|
||||||
Down,
|
Down,
|
||||||
SendPing { ping_count: u16 },
|
SendPing { ping_count: u16 },
|
||||||
WaitPingReply { ping_count: u16, timeout: u64 },
|
WaitPingReply { ping_count: u16, timeout: Milliseconds },
|
||||||
Up,
|
Up,
|
||||||
Failed
|
Failed
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ impl Repeater {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn recv_aux_timeout(&self, timeout: u32, timer: GlobalTimer) -> Result<drtioaux::Packet, drtioaux::Error> {
|
fn recv_aux_timeout(&self, timeout: u32, timer: GlobalTimer) -> Result<drtioaux::Packet, drtioaux::Error> {
|
||||||
let max_time = timer.get_time() + Milliseconds(timeout);
|
let max_time = timer.get_time() + Milliseconds(timeout.into());
|
||||||
loop {
|
loop {
|
||||||
if !rep_link_rx_up(self.repno) {
|
if !rep_link_rx_up(self.repno) {
|
||||||
return Err(drtioaux::Error::LinkDown);
|
return Err(drtioaux::Error::LinkDown);
|
||||||
|
|
Loading…
Reference in New Issue