implement sync write
This commit is contained in:
parent
f912c03661
commit
f265a6a153
@ -192,11 +192,12 @@ impl<'a> Instruction<'a> {
|
|||||||
buffer[4..4 + ids.len()].copy_from_slice(ids);
|
buffer[4..4 + ids.len()].copy_from_slice(ids);
|
||||||
Ok(4 + u16::try_from(ids.len()).map_err(|_| Error::Unknown)?)
|
Ok(4 + u16::try_from(ids.len()).map_err(|_| Error::Unknown)?)
|
||||||
}
|
}
|
||||||
SyncWrite {
|
SyncWrite { addr, len, data } if buffer.len() >= 4 + data.len() => {
|
||||||
addr: _,
|
buffer[..2].copy_from_slice(&addr.to_le_bytes());
|
||||||
len: _,
|
buffer[2..4].copy_from_slice(&len.to_le_bytes());
|
||||||
data: _,
|
buffer[4..4 + data.len()].copy_from_slice(data);
|
||||||
} => unimplemented!(),
|
Ok(4 + u16::try_from(data.len()).map_err(|_| Error::Unknown)?)
|
||||||
|
}
|
||||||
BulkRead { data: _ } => unimplemented!(),
|
BulkRead { data: _ } => unimplemented!(),
|
||||||
BulkWrite { data: _ } => unimplemented!(),
|
BulkWrite { data: _ } => unimplemented!(),
|
||||||
FastBulkRead { data: _ } => unimplemented!(),
|
FastBulkRead { data: _ } => unimplemented!(),
|
||||||
|
Loading…
Reference in New Issue
Block a user