Expand description
A Raspberry Pi driver for the ST7789V2-based WaveShare 1.69“ LCD display.
This crate provides a high-level interface for controlling a WaveShare 1.69“ LCD display connected to a Raspberry Pi over SPI.
It implements both a simple “image”-based interface and embedded_graphics’ traits.
§Example
let mut lcd = Driver::new(Default::default())?;
lcd.init()?;
lcd.probe_buffer_length()?;
let mut image = lcd.image();
image.solid(Rgb565::new(255, 0, 255));
lcd.print((0, 0), &image)?;Structs§
- Driver
- Driver for the LCD display.
- Driver
Args - Arguments to create a new LCD driver.
- Gate
Flags - Flags for the gate control.
- Memory
Access Control - Memory access control settings.
- Simple
Image - Simple image buffer.
Enums§
- Command
- LCD display commands
- Error
- Error type for driver operations.
- Gate
Interlace - Whether to interlace the gates.
- Gate
Mirror - Whether to mirror the gates.
- Gate
Scan Direction - The direction to scan the gates.
- Horizontal
- Horizontal refresh order values.
- Vertical
- Vertical refresh order values.
Constants§
- COLMOD_
12BPP - Set 12-bit colour mode.
- COLMOD_
16BPP - Set 16-bit colour mode.
- COLMOD_
16M_ TRUNC - Set 16M colour mode, truncated.
- COLMOD_
18BPP - Set 18-bit colour mode.
- COLMOD_
RGB_ 65K - Set RGB mode with 65K colours.
- COLMOD_
RGB_ 262K - Set RGB mode with 262K colours.
Functions§
- frame_
rate - Helper function to set the frame rate.
- gate_
control - Helper function to set the gate control values.
- gate_
voltages - Helper function to set the gate voltages.
- power_
control1 - Helper function to set the power control 1 values.
- power_
control2 - Helper function to set the power control 2 values.
Type Aliases§
- Result
- Convenience type for Results in this crate.