device_emulators

Function write_as_u32_chunks

Source
pub fn write_as_u32_chunks<F, Num>(offset: Num, data: &[u8], read_write_u32: F)
where F: FnMut(Num, ReadWriteRequestType) -> Option<u32>, Num: Into<u64> + TryFrom<u64>, <Num as TryFrom<u64>>::Error: Debug,
Expand description

Performs a device register write as a series of 32-bit reads and writes.

NOTE: We read u32 and then write back when we chunk. Because of this, the borrow checker requires a single mutable closure that implements both read/write semantics.