lv_color_t *buf1 = heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA); assert(buf1 != NULL); static lv_color_t *buf2 = NULL; static lv_disp_draw_buf_t disp_buf; uint32_t size_in_px = DISP_BUF_SIZE; lv_disp_draw_buf_init(&disp_buf, buf1, buf2, ...
uint8_t * buf = lv_mem_alloc(buf_size); LV_ASSERT_MALLOC(buf); if(buf == NULL) return NULL; lv_obj_t * canvas = lv_canvas_create(parent); if(canvas == NULL) return NULL; lv_canvas_set_buffer(canvas, buf, size, size, LV_IMG_CF_INDEXED_1BIT); lv_canvas_set_palette(canvas...
assert(buf1 !=NULL); //Do not use double buffer for epaper lv_color_t* buf2 =NULL; staticlv_disp_buf_tdisp_buf; /*Actual size in pixels, not bytes. PLEASE NOTE: This size must much the size of DISP_BUF_SIZE declared on lvgl_helpers.h ...
#define LV_USE_ASSERT_NULL 1 /**< Check if the parameter is NULL. (Very fast, recommended) */ #define LV_USE_ASSERT_MALLOC 1 /**< Checks is the memory is successfully allocated or no. (Very fast, recommended) */ #define LV_USE_ASSERT_STYLE 0 /**< Check if the styles are ...
lv_obj_t * top_act_scr = NULL; lv_obj_t * top_prev_scr = NULL; /*Get the most top object which is not covered by others*/ top_act_scr = lv_refr_get_top_obj(draw_ctx->buf_area, lv_disp_get_scr_act(disp_refr)); ...
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/ #define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/ #define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized...
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/ #define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/ #define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized...
#ifdef CONFIG_LV_USE_ASSERT_NULL #define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL #else #define LV_USE_ASSERT_NULL 0 #endif #else #define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/ ...
if(pos==NULL) TRACE0("No items were selected!\n"); else { while(pos) { int nItem=m_ListCtrl.GetNextSelectedItem(pos); TRACE1("Item %d was selected!\n", nItem); //添加其他操作 } } 8. 得到item的信息 TCHAR szBuf[1024];
voidlv_obj_invalidate_area(constlv_obj_t*obj,constlv_area_t*area){LV_ASSERT_OBJ(obj,MY_CLASS);lv_area_t area_tmp;lv_area_copy(&area_tmp,area);bool visible=lv_obj_area_is_visible(obj,&area_tmp);if(visible)_lv_inv_area(lv_obj_get_disp(obj),&area_tmp);} ...