pub enum RefreshMode {
Fast,
Full,
Partial,
Gray2,
}Expand description
The refresh mode for the display.
Variants§
Fast
Refreshes the entire display. This is slower than RefreshMode::Partial, but should be done occasionally to avoid ghosting. If ghosting persists, try RefreshMode::Full.
It’s recommended to avoid full refreshes less than RECOMMENDED_MIN_FULL_REFRESH_INTERVAL apart, but to do a full refresh at least every RECOMMENDED_MAX_FULL_REFRESH_INTERVAL.
Full
A slower full update that gives a cleaner final image.
It’s recommended to avoid full refreshes less than RECOMMENDED_MIN_FULL_REFRESH_INTERVAL apart, but to do a full refresh at least every RECOMMENDED_MAX_FULL_REFRESH_INTERVAL.
Partial
Changes only specific areas of the screen with no flickering. A fast/full refresh should be done occasionally to avoid ghosting, see RECOMMENDED_MAX_FULL_REFRESH_INTERVAL.
It diffs the current framebuffer against the previous framebuffer, and just updates the pixels that differ.
Gray2
A refresh mode that supports 2-bit grayscale. Note that Waveshare calls this “Gray4”, but
we use Gray2 to align with the embedded-graphics color embedded_graphics::pixelcolor::Gray2.
There is no partial update version for Gray2. All updates require writing to both on-device framebuffers.
Implementations§
Source§impl RefreshMode
impl RefreshMode
Sourcepub fn is_black_and_white(&self) -> bool
pub fn is_black_and_white(&self) -> bool
If this refresh mode is black and white only.
Trait Implementations§
Source§impl Clone for RefreshMode
impl Clone for RefreshMode
Source§fn clone(&self) -> RefreshMode
fn clone(&self) -> RefreshMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more