Add second screen draw to draw_full_frame for better compatibility
This commit is contained in:
parent
18d3720566
commit
daed5c2093
1 changed files with 18 additions and 1 deletions
19
src/lib.rs
19
src/lib.rs
|
|
@ -316,7 +316,10 @@ impl<BusyPin: InputPin, ResetPin: OutputPin, DcPin: OutputPin, Spi: SpiDevice, D
|
|||
self.wait_for_display();
|
||||
}
|
||||
|
||||
pub fn draw_full_frame<PartialWindow: ApplyPartialWindow>(&mut self, double_frame: &mut DoubleFrame<PartialWindow>) {
|
||||
pub fn draw_full_frame<PartialWindow: ApplyPartialWindow>(
|
||||
&mut self,
|
||||
double_frame: &mut DoubleFrame<PartialWindow>,
|
||||
) {
|
||||
double_frame.partial_window.apply(self);
|
||||
self.write_command(0x10);
|
||||
for byte in double_frame.old.0 {
|
||||
|
|
@ -329,6 +332,20 @@ impl<BusyPin: InputPin, ResetPin: OutputPin, DcPin: OutputPin, Spi: SpiDevice, D
|
|||
self.write_command(0x12);
|
||||
double_frame.old.0 = double_frame.new.0;
|
||||
|
||||
// self.delay.delay_ms(1);
|
||||
self.wait_for_display();
|
||||
|
||||
self.write_command(0x10);
|
||||
for byte in double_frame.new.0 {
|
||||
self.write_data(byte);
|
||||
}
|
||||
|
||||
self.write_command(0x13);
|
||||
for byte in double_frame.new.0 {
|
||||
self.write_data(byte);
|
||||
}
|
||||
self.write_command(0x12);
|
||||
|
||||
self.delay.delay_ms(1);
|
||||
self.wait_for_display();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue