Crate rpi_st7789v2_driver

Crate rpi_st7789v2_driver 

Source
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.
DriverArgs
Arguments to create a new LCD driver.
GateFlags
Flags for the gate control.
MemoryAccessControl
Memory access control settings.
SimpleImage
Simple image buffer.

Enums§

Command
LCD display commands
Error
Error type for driver operations.
GateInterlace
Whether to interlace the gates.
GateMirror
Whether to mirror the gates.
GateScanDirection
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.