From 94d51d1364ee4e0b3cf42004231c45c812814a47 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 10 Jan 2018 12:15:23 +0800 Subject: [PATCH] firmware: fix drtio_dbg module syntax --- artiq/firmware/ksupport/rtio.rs | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/artiq/firmware/ksupport/rtio.rs b/artiq/firmware/ksupport/rtio.rs index be9106348..f53243b46 100644 --- a/artiq/firmware/ksupport/rtio.rs +++ b/artiq/firmware/ksupport/rtio.rs @@ -193,23 +193,22 @@ mod imp { pub use self::imp::*; pub mod drtio_dbg { - use ::send; - use ::recv; - use kernel_proto::*; + use ::send; + use ::recv; + use kernel_proto::*; - #[repr(C)] - pub struct PacketCounts(i32, i32); + #[repr(C)] + pub struct PacketCounts(i32, i32); - pub extern fn get_packet_counts(linkno: i32) -> PacketCounts { - send(&DrtioPacketCountRequest { linkno: linkno as u8 }); - recv!(&DrtioPacketCountReply { tx_cnt, rx_cnt } - => PacketCounts(tx_cnt as i32, rx_cnt as i32)) - } + pub extern fn get_packet_counts(linkno: i32) -> PacketCounts { + send(&DrtioPacketCountRequest { linkno: linkno as u8 }); + recv!(&DrtioPacketCountReply { tx_cnt, rx_cnt } + => PacketCounts(tx_cnt as i32, rx_cnt as i32)) + } - pub extern fn get_buffer_space_req_count(linkno: i32) -> i32 { - send(&DrtioBufferSpaceReqCountRequest { linkno: linkno as u8 }); - recv!(&DrtioBufferSpaceReqCountReply { cnt } - => cnt as i32) - } + pub extern fn get_buffer_space_req_count(linkno: i32) -> i32 { + send(&DrtioBufferSpaceReqCountRequest { linkno: linkno as u8 }); + recv!(&DrtioBufferSpaceReqCountReply { cnt } + => cnt as i32) } }