LV_IMG_DECLARE(wavrshare_btn)//声明自定义图标 void demo_create(void) { lv_obj_t *scr= lv_disp_get_scr_act(NULL); /* 获取当前屏幕 */ lv_obj_t * img1 = lv_img_create(lv_scr_act(), NULL); lv_img_set_src(img1, &wavrshare_btn); lv_obj_align(img1, NULL, LV_ALIGN_CENT...
staticlv_disp_drv_tdisp_drv;//静态的一个显示驱动结构体lv_disp_drv_init(&disp_drv);//初始化结构体disp_drv.draw_buf=&disp_buf;//指向上一章显示缓存的指针disp_drv.flush_cb=my_flush_cb;//回调函数,将缓冲区的内容复制到显示器的特定区域disp_drv.hor_res=320;//水平像素disp_drv.ver_res=24...
We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {...
Solutions By company size Enterprises Small and medium teams Startups By use case DevSecOps DevOps CI/CD View all use cases By industry Healthcare Financial services Manufacturing Government View all industries View all solutions Resources Topics AI DevOps Security Software Development...
lv_event_code_t code = lv_event_get_code(e); switch (code) { case LV_EVENT_CLICKED: { lv_disp_t * d = lv_obj_get_disp(lv_scr_act()); if (d->prev_scr == NULL && d->scr_to_load == NULL) { setup_scr_screen2(&guider_ui); ...
#scr = lv.obj() #scr===> screen 屏幕 fs_drv = lv.fs_drv_t() fs_driver.fs_register(fs_drv, 'S') #先定义界面元素 scr = lv.scr_act() btn = lv.btn(scr) btn1=lv.btn(scr) btn2=lv.btn(scr) label =lv.label(btn) label...
lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL); lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor); /*--- * Keypad * ---*/ /*Initialize your keypad or keyboard if you have*/ ...
self.tabview = lv.tabview(lv.scr_act()) The first argument to an object constructor is the parent object, the second is which element to copy this element from. Both arguments are optional. Calling an object method self.symbol.align(self, lv.ALIGN.CENTER,0,0) ...
//显示屏初始化WIDTH=width;HEIGHT=height;buf=newuint32_t[WIDTH*HEIGHT];lv_disp_draw_buf_init(&lv_disp_buf,lv_buf_1,lv_buf_2,DISP_BUF_SIZE);staticlv_disp_drv_t disp_drv;lv_disp_drv_init(&disp_drv);disp_drv.hor_res=WIDTH;disp_drv.ver_res=HEIGHT;disp_drv.draw_buf=&lv_disp_buf...
lv_disp_t* lv_obj_get_disp ( const lv_obj_t * obj ) Get the display of an object Parameters scr pointer to an object Returns pointer the object's display § lv_obj_get_parent()lv_obj_t* lv_obj_get_parent ( const lv_obj_t * obj ) Returns with the parent of an object...