feat(nuttx): add lv_nuttx_deinit
This commit is contained in:
@@ -177,6 +177,38 @@ uint32_t lv_nuttx_get_idle(void)
|
||||
|
||||
#endif
|
||||
|
||||
void lv_nuttx_deinit(lv_nuttx_result_t * result)
|
||||
{
|
||||
#if !LV_USE_NUTTX_CUSTOM_INIT
|
||||
if(result) {
|
||||
if(result->disp) {
|
||||
lv_display_delete(result->disp);
|
||||
result->disp = NULL;
|
||||
}
|
||||
|
||||
if(result->indev) {
|
||||
lv_indev_delete(result->indev);
|
||||
result->indev = NULL;
|
||||
}
|
||||
|
||||
if(result->utouch_indev) {
|
||||
lv_indev_delete(result->utouch_indev);
|
||||
result->utouch_indev = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
lv_nuttx_deinit_custom(result);
|
||||
#endif
|
||||
|
||||
if(nuttx_ctx_p) {
|
||||
lv_nuttx_cache_deinit();
|
||||
lv_nuttx_image_cache_deinit();
|
||||
|
||||
lv_free(nuttx_ctx_p);
|
||||
nuttx_ctx_p = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
||||
Reference in New Issue
Block a user