forked from M-Labs/artiq-zynq
drtio-mgmt: fix len order
This commit is contained in:
parent
f7e2089b5b
commit
be1f34bf7b
|
@ -351,7 +351,7 @@ mod remote_coremgmt {
|
||||||
let mut buffer = Vec::<u8>::new();
|
let mut buffer = Vec::<u8>::new();
|
||||||
loop {
|
loop {
|
||||||
match reply {
|
match reply {
|
||||||
Packet::CoreMgmtConfigReadReply { length, last, value } => {
|
Packet::CoreMgmtConfigReadReply { last, length, value } => {
|
||||||
buffer.extend(&value[..length as usize]);
|
buffer.extend(&value[..length as usize]);
|
||||||
|
|
||||||
if last {
|
if last {
|
||||||
|
@ -403,8 +403,8 @@ mod remote_coremgmt {
|
||||||
message.get_ref(),
|
message.get_ref(),
|
||||||
|slice, status, len: usize| Packet::CoreMgmtConfigWriteRequest {
|
|slice, status, len: usize| Packet::CoreMgmtConfigWriteRequest {
|
||||||
destination: destination,
|
destination: destination,
|
||||||
length: len as u16,
|
|
||||||
last: status.is_last(),
|
last: status.is_last(),
|
||||||
|
length: len as u16,
|
||||||
data: *slice,
|
data: *slice,
|
||||||
},
|
},
|
||||||
|reply| match reply {
|
|reply| match reply {
|
||||||
|
|
|
@ -1140,8 +1140,8 @@ fn process_aux_packet(
|
||||||
drtioaux::send(
|
drtioaux::send(
|
||||||
0,
|
0,
|
||||||
&drtioaux::Packet::CoreMgmtConfigReadReply {
|
&drtioaux::Packet::CoreMgmtConfigReadReply {
|
||||||
length: meta.len as u16,
|
|
||||||
last: meta.status.is_last(),
|
last: meta.status.is_last(),
|
||||||
|
length: meta.len as u16,
|
||||||
value: value_slice,
|
value: value_slice,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -1169,16 +1169,16 @@ fn process_aux_packet(
|
||||||
drtioaux::send(
|
drtioaux::send(
|
||||||
0,
|
0,
|
||||||
&drtioaux::Packet::CoreMgmtConfigReadReply {
|
&drtioaux::Packet::CoreMgmtConfigReadReply {
|
||||||
length: meta.len as u16,
|
|
||||||
last: meta.status.is_last(),
|
last: meta.status.is_last(),
|
||||||
|
length: meta.len as u16,
|
||||||
value: value_slice,
|
value: value_slice,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
drtioaux::Packet::CoreMgmtConfigWriteRequest {
|
drtioaux::Packet::CoreMgmtConfigWriteRequest {
|
||||||
destination: _destination,
|
destination: _destination,
|
||||||
length,
|
|
||||||
last,
|
last,
|
||||||
|
length,
|
||||||
data,
|
data,
|
||||||
} => {
|
} => {
|
||||||
forward!(
|
forward!(
|
||||||
|
|
Loading…
Reference in New Issue