From 1fc3ea40f7b03955d395e33bb41fbd3be0e572e0 Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 23 Aug 2024 11:46:16 +0800 Subject: [PATCH] drtio-mgmt: reorder last param --- src/libboard_artiq/src/drtioaux_proto.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/libboard_artiq/src/drtioaux_proto.rs b/src/libboard_artiq/src/drtioaux_proto.rs index e217416..a1ca7b7 100644 --- a/src/libboard_artiq/src/drtioaux_proto.rs +++ b/src/libboard_artiq/src/drtioaux_proto.rs @@ -313,8 +313,8 @@ pub enum Packet { }, CoreMgmtConfigWriteRequest { destination: u8, - length: u16, last: bool, + length: u16, data: [u8; MASTER_PAYLOAD_MAX_SIZE], }, CoreMgmtConfigRemoveRequest { @@ -337,8 +337,8 @@ pub enum Packet { data: [u8; SAT_PAYLOAD_MAX_SIZE], }, CoreMgmtConfigReadReply { - length: u16, last: bool, + length: u16, value: [u8; SAT_PAYLOAD_MAX_SIZE], }, CoreMgmtAck, @@ -650,14 +650,14 @@ impl Packet { }, 0xd6 => { let destination = reader.read_u8()?; - let length = reader.read_u16()?; let last = reader.read_bool()?; + let length = reader.read_u16()?; let mut data: [u8; MASTER_PAYLOAD_MAX_SIZE] = [0; MASTER_PAYLOAD_MAX_SIZE]; reader.read_exact(&mut data[0..length as usize])?; Packet::CoreMgmtConfigWriteRequest { destination: destination, - length: length, last: last, + length: length, data: data, } } @@ -693,13 +693,13 @@ impl Packet { } }, 0xdc => { - let length = reader.read_u16()?; let last = reader.read_bool()?; + let length = reader.read_u16()?; let mut value: [u8; SAT_PAYLOAD_MAX_SIZE] = [0; SAT_PAYLOAD_MAX_SIZE]; reader.read_exact(&mut value[0..length as usize])?; Packet::CoreMgmtConfigReadReply { - length: length, last: last, + length: length, value: value, } }, @@ -1117,14 +1117,14 @@ impl Packet { } Packet::CoreMgmtConfigWriteRequest { destination, - length, last, + length, data, } => { writer.write_u8(0xd6)?; writer.write_u8(destination)?; - writer.write_u16(length)?; writer.write_bool(last)?; + writer.write_u16(length)?; writer.write_all(&data[0..length as usize])?; } Packet::CoreMgmtConfigRemoveRequest { @@ -1156,13 +1156,13 @@ impl Packet { writer.write_all(&data[0..length as usize])?; } Packet::CoreMgmtConfigReadReply { - length, last, + length, value, } => { writer.write_u8(0xdc)?; - writer.write_u16(length)?; writer.write_bool(last)?; + writer.write_u16(length)?; writer.write_all(&value[0..length as usize])?; } Packet::CoreMgmtAck => writer.write_u8(0xdd)?,