Removed data_x_times function

This commit is contained in:
Chris
2018-10-10 14:43:18 +02:00
parent 99d328575f
commit 6a24acf62b
4 changed files with 24 additions and 34 deletions
+5 -2
View File
@@ -178,8 +178,11 @@ where
// clear the ram with the background color
let color = self.background_color.get_byte_value();
self.interface.cmd(Command::WRITE_RAM)?;
self.interface.data_x_times(color, WIDTH / 8 * HEIGHT)
//TODO: this is using a big buffer atm, is it better to just loop over sending a single byte?
self.interface.cmd_with_data(
Command::WRITE_RAM,
&[color; WIDTH as usize / 8 * HEIGHT as usize]
)
}