diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 4268be651..63d1f0989 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -84,6 +84,11 @@ const lv_obj_class_t lv_obj_class = { * GLOBAL FUNCTIONS **********************/ +bool lv_is_initialized(void) +{ + return lv_initialized; +} + void lv_init(void) { /*Do nothing if already initialized*/ diff --git a/src/core/lv_obj.h b/src/core/lv_obj.h index 79d542236..9c8846610 100644 --- a/src/core/lv_obj.h +++ b/src/core/lv_obj.h @@ -204,6 +204,11 @@ void lv_deinit(void); #endif +/** + * Returns whether the 'lv' library is currently initialized + */ +bool lv_is_initialized(void); + /** * Create a base object (a rectangle) * @param parent pointer to a parent object. If NULL then a screen will be created.