mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-04 06:16:42 +00:00
readd data_x_times
This commit is contained in:
+4
-4
@@ -181,11 +181,11 @@ where
|
||||
let color = self.background_color.get_byte_value();
|
||||
|
||||
//TODO: this is using a big buffer atm, is it better to just loop over sending a single byte?
|
||||
self.interface.cmd_with_data(
|
||||
self.interface.cmd(
|
||||
spi,
|
||||
Command::WRITE_RAM,
|
||||
&[color; WIDTH as usize / 8 * HEIGHT as usize]
|
||||
)
|
||||
Command::WRITE_RAM
|
||||
)?;
|
||||
self.interface.data_x_times(spi, color, WIDTH / 8 * HEIGHT)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user