99 uint8_t reset_pin, uint8_t backlight_pin,
bool driver_st7789_update_rect(driver_st7789_t *st7789, driver_st7789_rect_t rect, const uint8_t *data, size_t size)
Update a rectangular region of the ST7789 display.
bool driver_st7789_write_pixels(driver_st7789_t *st7789, const uint8_t *data, size_t size)
Send pixel data to the ST7789 display.
void driver_st7789_reset(driver_st7789_t *st7789)
Reset the ST7789 display.
driver_st7789_interface_t
ST7789 interface type.
ST7789 display driver structure.
hw_spi_t * spi
Pointer to the SPI interface (NULL for parallel)
hw_gpio_t dc
Data/Command pin.
driver_st7789_rotation_t rotation
Display rotation.
driver_st7789_interface_t interface
Interface type (SPI/Parallel)
uint16_t width
Width (pixels)
driver_st7789_rotation_t
ST7789 rotation modes.
hw_gpio_t backlight
Backlight pin (optional, can be invalid)
uint16_t width
Display width in pixels.
uint8_t backlight_brightness
Current backlight brightness (0-255)
Hardware interface abstraction layer.
bool driver_st7789_set_backlight(driver_st7789_t *st7789, uint8_t brightness)
Set the backlight brightness of the ST7789 display.
bool driver_st7789_valid(const driver_st7789_t *st7789)
Check if a ST7789 driver structure is valid.
bool driver_st7789_set_window(driver_st7789_t *st7789, driver_st7789_rect_t rect)
Set the display window for subsequent pixel data.
driver_st7789_t driver_st7789_init(hw_spi_t *spi, uint8_t dc_pin, uint8_t reset_pin, uint8_t backlight_pin, uint16_t width, uint16_t height, bool round)
Initialize a ST7789 display driver using the SPI interface.
uint16_t y
Y coordinate (pixels)
void driver_st7789_finalize(driver_st7789_t *st7789)
Finalize and release a ST7789 display driver.
hw_gpio_t reset
Reset pin (optional, can be invalid)
bool driver_st7789_fill(driver_st7789_t *st7789, uint16_t color)
Fill the entire display with a single color.
bool round
Round display flag.
bool driver_st7789_set_rotation(driver_st7789_t *st7789, driver_st7789_rotation_t rotation)
Set the rotation of the ST7789 display.
uint16_t x
X coordinate (pixels)
GPIO logical pin structure.
ST7789 display rectangle for window operations.
uint16_t height
Height (pixels)
struct driver_st7789_t driver_st7789_t
ST7789 display driver structure.
uint16_t height
Display height in pixels.