-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Before initialization, clear and flush did not function properly, which prevented the reset of the GRAM ,and resulted in a garbled screen display.
The following is the code for STM32F103:
let interface = I2CDisplayInterface::new(i2c_ssd1306);
let mut display = Ssd1306::new(interface, DisplaySize128x64, DisplayRotation::Rotate0)
.into_buffered_graphics_mode();
display.clear_buffer();
display.flush().unwrap(); // not work
display.init().unwrap();
delay.delay_ms(2000u16);
When the I2C bus is connected to other I2C devices, such as the BPM280 and AHT20 devices, after power-on, there will be snowflakes output on the screen. Clearing the screen before initialization is ineffective. After initialization, clearing the screen still results in a small amount of snowflakes.
When adding a delay of 2 seconds after init, the same issue also occurs on both ESP32 and RP2040.
The expectation is that before turning on the screen, the video memory should be reset so that the screen remains clean ,and does not display any remaining data (possibly caused by capacitors) that has not been erased from GRAM.

