diff options
Diffstat (limited to 'bsp/imxrt')
| -rw-r--r-- | bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c | 16 | ||||
| -rw-r--r-- | bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h | 4 |
2 files changed, 8 insertions, 12 deletions
diff --git a/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c b/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c index e873af6552..6eef6b78d7 100644 --- a/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c +++ b/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c @@ -8,13 +8,14 @@ * 2021-10-18 Meco Man The first version */ #include <lvgl.h> -#include <stdbool.h> #include <rtdevice.h> static lv_indev_state_t last_state = LV_INDEV_STATE_REL; static rt_int16_t last_x = 0; static rt_int16_t last_y = 0; +lv_indev_t * touch_indev; + static void input_read(lv_indev_drv_t *indev_drv, lv_indev_data_t *data) { data->point.x = last_x; @@ -29,16 +30,15 @@ void lv_port_indev_input(rt_int16_t x, rt_int16_t y, lv_indev_state_t state) last_y = LV_HOR_RES_MAX - y; } -lv_indev_t * button_indev; - void lv_port_indev_init(void) { static lv_indev_drv_t indev_drv; - lv_indev_drv_init(&indev_drv); /*Basic initialization*/ - indev_drv.type = LV_INDEV_TYPE_POINTER; - indev_drv.read_cb = input_read; + /* Has not supported touch sensor! */ + // lv_indev_drv_init(&indev_drv); /*Basic initialization*/ + // indev_drv.type = LV_INDEV_TYPE_POINTER; + // indev_drv.read_cb = input_read; - /*Register the driver in LVGL and save the created input device object*/ - button_indev = lv_indev_drv_register(&indev_drv); + // /*Register the driver in LVGL and save the created input device object*/ + // touch_indev = lv_indev_drv_register(&indev_drv); } diff --git a/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h b/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h index bc5238123f..0764bb014e 100644 --- a/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h +++ b/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h @@ -14,10 +14,6 @@ extern "C" { #endif -#include <lv_hal_indev.h> - -extern lv_indev_t * button_indev; - void lv_port_indev_init(void); void lv_port_indev_input(rt_int16_t x, rt_int16_t y, lv_indev_state_t state); |
