pub enum RefreshMode {
Full,
FullSlow,
Partial,
Gray2,
}Expand description
The refresh mode for the display.
Variants§
Full
Use the full update LUT. This is slower than RefreshMode::Partial, but should be done occasionally to avoid ghosting. If ghosting persists, try RefreshMode::FullSlow.
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.
FullSlow
A slower full update that gives a cleaner final image. This corresponds with the WS_20_30
LUT in the sample code.
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
Uses the partial update LUT for fast refresh. A full refresh should be done occasionally to avoid ghosting, see RECOMMENDED_MAX_FULL_REFRESH_INTERVAL.
This is the standard “fast” update. 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 border_waveform(&self) -> Option<&[u8]>
pub fn border_waveform(&self) -> Option<&[u8]>
Returns the border waveform setting to use for this refresh mode.
pub fn lut_magic(&self) -> &[u8]
pub fn gate_voltage(&self) -> &[u8]
pub fn source_voltage(&self) -> &[u8]
pub fn vcom(&self) -> &[u8]
Sourcepub fn display_update_control_2(&self) -> &[u8]
pub fn display_update_control_2(&self) -> &[u8]
Returns the value to set for Command::DisplayUpdateControl2 when using this refresh mode.
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more