mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Merge pull request #83 from belak/aggressive-write
Write data over SPI 1 byte at a time
This commit is contained in:
+6
-2
@@ -60,8 +60,12 @@ where
|
|||||||
// high for data
|
// high for data
|
||||||
let _ = self.dc.set_high();
|
let _ = self.dc.set_high();
|
||||||
|
|
||||||
// Transfer data (u8-array) over spi
|
for val in data.iter().copied() {
|
||||||
self.write(spi, data)
|
// Transfer data one u8 at a time over spi
|
||||||
|
self.write(spi, &[val])?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Basic function for sending [Commands](Command) and the data belonging to it.
|
/// Basic function for sending [Commands](Command) and the data belonging to it.
|
||||||
|
|||||||
Reference in New Issue
Block a user