Lines Matching refs:indev

86     lv_indev_t * indev = _lv_ll_ins_head(&LV_GC_ROOT(_lv_indev_ll));  in lv_indev_drv_register()  local
87 LV_ASSERT_MALLOC(indev); in lv_indev_drv_register()
88 if(!indev) { in lv_indev_drv_register()
92 lv_memset_00(indev, sizeof(lv_indev_t)); in lv_indev_drv_register()
93 indev->driver = driver; in lv_indev_drv_register()
95 indev->proc.reset_query = 1; in lv_indev_drv_register()
96indev->driver->read_timer = lv_timer_create(lv_indev_read_timer_cb, LV_INDEV_DEF_READ_PERIOD, inde… in lv_indev_drv_register()
98 return indev; in lv_indev_drv_register()
106 void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv) in lv_indev_drv_update() argument
108 LV_ASSERT_NULL(indev); in lv_indev_drv_update()
109 LV_ASSERT_NULL(indev->driver); in lv_indev_drv_update()
110 LV_ASSERT_NULL(indev->driver->read_timer); in lv_indev_drv_update()
111 lv_timer_del(indev->driver->read_timer); in lv_indev_drv_update()
120 indev->proc.disabled = true; in lv_indev_drv_update()
124 indev->driver = new_drv; in lv_indev_drv_update()
125indev->driver->read_timer = lv_timer_create(lv_indev_read_timer_cb, LV_INDEV_DEF_READ_PERIOD, inde… in lv_indev_drv_update()
126 indev->proc.reset_query = 1; in lv_indev_drv_update()
133 void lv_indev_delete(lv_indev_t * indev) in lv_indev_delete() argument
135 LV_ASSERT_NULL(indev); in lv_indev_delete()
136 LV_ASSERT_NULL(indev->driver); in lv_indev_delete()
137 LV_ASSERT_NULL(indev->driver->read_timer); in lv_indev_delete()
139 lv_timer_del(indev->driver->read_timer); in lv_indev_delete()
141 _lv_ll_remove(&LV_GC_ROOT(_lv_indev_ll), indev); in lv_indev_delete()
143 lv_mem_free(indev); in lv_indev_delete()
152 lv_indev_t * lv_indev_get_next(lv_indev_t * indev) in lv_indev_get_next() argument
154 if(indev == NULL) in lv_indev_get_next()
157 return _lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev); in lv_indev_get_next()
165 void _lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data) in _lv_indev_read() argument
171 if(indev->driver->type == LV_INDEV_TYPE_POINTER) { in _lv_indev_read()
172 data->point.x = indev->proc.types.pointer.last_raw_point.x; in _lv_indev_read()
173 data->point.y = indev->proc.types.pointer.last_raw_point.y; in _lv_indev_read()
176 else if(indev->driver->type == LV_INDEV_TYPE_KEYPAD) { in _lv_indev_read()
177 data->key = indev->proc.types.keypad.last_key; in _lv_indev_read()
180 else if(indev->driver->type == LV_INDEV_TYPE_ENCODER) { in _lv_indev_read()
184 if(indev->driver->read_cb) { in _lv_indev_read()
186 indev->driver->read_cb(indev->driver, data); in _lv_indev_read()