Adafruit lvgl Glue Library
Public Member Functions | Public Attributes | List of all members
Adafruit_LvGL_Glue Class Reference

Class to act as a "glue" layer between the LvGL graphics library and most of Adafruit's TFT displays. More...

#include <Adafruit_LvGL_Glue.h>

Inheritance diagram for Adafruit_LvGL_Glue:
Adafruit_LvGL_Glue_SD

Public Member Functions

 Adafruit_LvGL_Glue (void)
 Construct a new Adafruit_LvGL_Glue::Adafruit_LvGL_Glue object, initializing minimal variables.
 
 ~Adafruit_LvGL_Glue (void)
 Destroy the Adafruit_LvGL_Glue::Adafruit_LvGL_Glue object, freeing any memory previously allocated within this library.
 
LvGLStatus begin (Adafruit_SPITFT *tft, Adafruit_STMPE610 *touch, bool debug=false)
 Configure the glue layer and the underlying LvGL code to use the given TFT display driver instance and touchscreen controller. More...
 
LvGLStatus begin (Adafruit_SPITFT *tft, TouchScreen *touch, bool debug=false)
 Configure the glue layer and the underlying LvGL code to use the given TFT display driver and touchscreen controller instances. More...
 
LvGLStatus begin (Adafruit_SPITFT *tft, bool debug=false)
 Configure the glue layer and the underlying LvGL code to use the given TFT display driver and touchscreen controller instances. More...
 

Public Attributes

Adafruit_SPITFT * display
 Pointer to the SPITFT display instance.
 
void * touchscreen
 Pointer to the touchscreen object to use.
 
bool is_adc_touch
 determines if the touchscreen controlelr is ADC based
 
bool first_frame
 

Detailed Description

Class to act as a "glue" layer between the LvGL graphics library and most of Adafruit's TFT displays.

Member Function Documentation

◆ begin() [1/3]

LvGLStatus Adafruit_LvGL_Glue::begin ( Adafruit_SPITFT *  tft,
Adafruit_STMPE610 *  touch,
bool  debug = false 
)

Configure the glue layer and the underlying LvGL code to use the given TFT display driver instance and touchscreen controller.

Parameters
tftPointer to an already initialized display object instance
touchPointer to an already initialized Adafruit_STMPE610 touchscreen controller object instance
debugDebug flag to enable debug messages. Only used if LV_USE_LOG is configured in LittleLVGL's lv_conf.h
Returns
LvGLStatus The status of the initialization:
  • LVGL_OK : Success
  • LVGL_ERR_TIMER : Failure to set up timers
  • LVGL_ERR_ALLOC : Failure to allocate memory

◆ begin() [2/3]

LvGLStatus Adafruit_LvGL_Glue::begin ( Adafruit_SPITFT *  tft,
TouchScreen *  touch,
bool  debug = false 
)

Configure the glue layer and the underlying LvGL code to use the given TFT display driver and touchscreen controller instances.

Parameters
tftPointer to an already initialized display object instance
touchPointer to an already initialized TouchScreen touchscreen controller object instance
debugDebug flag to enable debug messages. Only used if LV_USE_LOG is configured in LittleLVGL's lv_conf.h
Returns
LvGLStatus The status of the initialization:
  • LVGL_OK : Success
  • LVGL_ERR_TIMER : Failure to set up timers
  • LVGL_ERR_ALLOC : Failure to allocate memory

◆ begin() [3/3]

LvGLStatus Adafruit_LvGL_Glue::begin ( Adafruit_SPITFT *  tft,
bool  debug = false 
)

Configure the glue layer and the underlying LvGL code to use the given TFT display driver and touchscreen controller instances.

Parameters
tftPointer to an already initialized display object instance
debugDebug flag to enable debug messages. Only used if LV_USE_LOG is configured in LittleLVGL's lv_conf.h
Returns
LvGLStatus The status of the initialization:
  • LVGL_OK : Success
  • LVGL_ERR_TIMER : Failure to set up timers
  • LVGL_ERR_ALLOC : Failure to allocate memory

Member Data Documentation

◆ first_frame

bool Adafruit_LvGL_Glue::first_frame

Tracks if a call to lv_flush_callback needs to wait for DMA transfer to complete


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