readd data_x_times

This commit is contained in:
Chris
2018-10-11 00:33:44 +02:00
parent 98e392fff1
commit 468425881c
2 changed files with 25 additions and 4 deletions
+4 -4
View File
@@ -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)
}