mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
0d6c08105a
* fix(demo): fix warning. lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.c:169:5: warning: "LV_EX_MOUSEWHEEL" is not defined, evaluates to 0 [-Wundef] 169 | #if LV_EX_MOUSEWHEEL | ^~~~~~~~~~~~~~~~ Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> * fix benchmark warning. ~/lvgl/demos/benchmark/lv_demo_benchmark.c:1069:33: warning: cast between incompatible function types from ‘void (*)(lv_obj_t , uint16_t)’ {aka ‘void ()(struct _lv_obj_t , short unsigned int)’} to ‘void ()(void , int32_t)’ {aka ‘void ()(void , int)’} [-Wcast-function-type] 1069 | lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_arc_set_end_angle); | ^ ~/lvgl/demos/benchmark/lv_demo_benchmark.c: In function ‘fall_anim’: ~/lvgl/demos/benchmark/lv_demo_benchmark.c:1090:29: warning: cast between incompatible function types from ‘void ()(struct _lv_obj_t , lv_coord_t)’ {aka ‘void ()(struct _lv_obj_t , short int)’} to ‘void ()(void , int32_t)’ {aka ‘void ()(void *, int)’} [-Wcast-function-type] 1090 | lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_obj_set_y); | Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Keypad and Encoder demo
Overview
LVGL allows you to control the widgets with keypad and/or encoder without touchpad. This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad. Learn more about the touchpad-less usage of LVGL here.
Run the demo
- In
lv_conf.h
or equivalent places setLV_USE_DEMO_KEYPAD_AND_ENCODER 1
- After
lv_init()
and initializing the drivers calllv_demo_keypad_encoder()