forked from M-Labs/artiq-zynq
SdReader: fixed write cache bug.
This commit is contained in:
parent
e6cf3e90d3
commit
0f797284e2
|
@ -237,6 +237,7 @@ impl Write for SdReader {
|
|||
let (a, b, c) = self.block_align(buf);
|
||||
self.write_unaligned(a)?;
|
||||
if b.len() > 0 {
|
||||
self.flush()?;
|
||||
self.invalidate_buffer();
|
||||
if let Err(_) = self.sd.write_block(
|
||||
self.byte_addr / BLOCK_SIZE as u32,
|
||||
|
|
Loading…
Reference in New Issue