File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1365,6 +1365,15 @@ def register_int_ptr_type(convertor, *types):
1365
1365
1366
1366
}
1367
1367
1368
+ void mp_deinit_lvgl_mod()
1369
+ {
1370
+
1371
+ if (MP_STATE_VM(lvgl_mod_initialized)) {
1372
+ lv_deinit();
1373
+ }
1374
+
1375
+ }
1376
+
1368
1377
static mp_obj_t lvgl_mod___init__(void) {
1369
1378
if (!MP_STATE_VM(lvgl_mod_initialized)) {
1370
1379
// __init__ for builtins is called each time the module is imported,
Original file line number Diff line number Diff line change @@ -306,6 +306,10 @@ extern void mp_lv_deinit_gc();
306
306
#define LV_GC_INIT () mp_lv_init_gc()
307
307
#define LV_GC_DEINIT () mp_lv_deinit_gc()
308
308
309
+ // include lv_conf.h in "mpconfigboard.h" for this to take effect.
310
+ extern void mp_deinit_lvgl_mod ();
311
+ #define MICROPY_PORT_DEINIT_FUNC mp_deinit_lvgl_mod()
312
+
309
313
#define LV_ENABLE_GLOBAL_CUSTOM 1
310
314
#if LV_ENABLE_GLOBAL_CUSTOM
311
315
extern void * mp_lv_roots ;
You can’t perform that action at this time.
0 commit comments