oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ove::lvgl::LvglGuard Class Reference

RAII scoped lock for thread-safe access to the LVGL rendering context. More...

#include <lvgl.hpp>

Public Member Functions

 LvglGuard ()
 Acquires the LVGL lock, blocking until it is available.
 
 ~LvglGuard ()
 Releases the LVGL lock.
 
 LvglGuard (const LvglGuard &)=delete
 
LvglGuardoperator= (const LvglGuard &)=delete
 
 LvglGuard (LvglGuard &&)=delete
 
LvglGuardoperator= (LvglGuard &&)=delete
 

Detailed Description

RAII scoped lock for thread-safe access to the LVGL rendering context.

Acquires the LVGL lock on construction (via ove_lvgl_lock()) and releases it on destruction (via ove_lvgl_unlock()). Use this whenever LVGL API calls are made from a thread other than the dedicated LVGL task.

Note
Non-copyable and non-movable.

Example:

{
label.text("Hello!");
} // lock released here
RAII scoped lock for thread-safe access to the LVGL rendering context.
Definition lvgl.hpp:66

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