Use `data_x_times` instead of big u8-slice
parent
4931c7aeb3
commit
375adf4bff
|
|
@ -200,11 +200,8 @@ 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(
|
||||
spi,
|
||||
Command::WRITE_RAM,
|
||||
&[color; WIDTH as usize / 8 * HEIGHT as usize]
|
||||
)
|
||||
self.interface.cmd(spi, Command::WRITE_RAM)?;
|
||||
self.interface.data_x_times(spi, color, WIDTH / 8 * HEIGHT)
|
||||
}
|
||||
|
||||
fn set_background_color(&mut self, background_color: Color) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue