Merge pull request #83 from belak/aggressive-write

Write data over SPI 1 byte at a time
This commit is contained in:
Chris
2021-11-28 23:03:12 +01:00
committed by GitHub
+6 -2
View File
@@ -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.