37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#ifndef LVGL_PORT_H
|
|
#define LVGL_PORT_H
|
|
|
|
#include <stdbool.h>
|
|
#include "esp_err.h"
|
|
|
|
/* Calls lv_init() and creates the LVGL mutex. Must run before display_start()
|
|
* and touch_init(), which register themselves with LVGL. */
|
|
esp_err_t lvgl_port_init(void);
|
|
|
|
/* Starts the tick source and the task that services lv_timer_handler().
|
|
* Call once the display and input devices are registered. */
|
|
esp_err_t lvgl_port_start(void);
|
|
|
|
/*
|
|
* LVGL is not thread safe. Any code touching an lv_* object from outside the
|
|
* LVGL task must hold this lock. Returns false on timeout.
|
|
*/
|
|
bool lvgl_port_lock(int timeout_ms);
|
|
void lvgl_port_unlock(void);
|
|
|
|
/*
|
|
* Suspend/resume LVGL rendering.
|
|
*
|
|
* The panel keeps scanning out whatever frame is already in the framebuffer,
|
|
* so the image stays on screen -- it simply stops being redrawn. Used to keep
|
|
* LVGL off the PSRAM bus while a network fetch is in flight, since the redraw,
|
|
* the flush and the TLS session otherwise contend with the LCD's own DMA.
|
|
*
|
|
* Calls do not nest.
|
|
*/
|
|
void lvgl_port_pause(void);
|
|
void lvgl_port_resume(void);
|
|
bool lvgl_port_is_paused(void);
|
|
|
|
#endif
|