Adafruit Library
Public Member Functions | Public Attributes | List of all members
ws_display_driver Class Reference

Display driver for LVGL and LVGL_Glue in WipperSnapper. More...

#include <ws_display_driver.h>

Public Member Functions

 ws_display_driver (displayConfig config)
 Creates a new WipperSnapper display driver object from a configuration struct. More...
 
 ~ws_display_driver ()
 Deletes a new WipperSnapper display driver object.
 
bool begin ()
 Initializes the display and the lvgl_glue driver. More...
 
void setResolution (uint16_t displayWidth, uint16_t displayHeight)
 Sets the display resolution, must be called BEFORE begin()! More...
 
void setRotation (uint8_t rotationMode)
 Sets the display's rotation mode. More...
 
void enableLogging ()
 Enables LVGL logging using the usb serial. Must be called AFTER calling Serial.begin().
 
void esp32_lvgl_acquire ()
 Acquires the LVGL_Glue lock.
 
void esp32_lvgl_release ()
 Releases the LVGL_Glue lock.
 

Public Attributes

Adafruit_LvGL_Glue * _glue
 LVGL glue object.
 

Detailed Description

Display driver for LVGL and LVGL_Glue in WipperSnapper.

Constructor & Destructor Documentation

◆ ws_display_driver()

ws_display_driver::ws_display_driver ( displayConfig  config)

Creates a new WipperSnapper display driver object from a configuration struct.

Parameters
configConfiguration struct., from FS.parseDisplayConfig();

Member Function Documentation

◆ begin()

bool ws_display_driver::begin ( )

Initializes the display and the lvgl_glue driver.

Returns
True if LVGL_Glue began successfully, False otherwise.

◆ setResolution()

void ws_display_driver::setResolution ( uint16_t  displayWidth,
uint16_t  displayHeight 
)

Sets the display resolution, must be called BEFORE begin()!

Parameters
displayWidthThe width of the display, in pixels.
displayHeightThe height of the display, in pixels.

◆ setRotation()

void ws_display_driver::setRotation ( uint8_t  rotationMode)

Sets the display's rotation mode.

Parameters
rotationModeThe index for rotation (0-3 inclusive).

The documentation for this class was generated from the following files: