Lines Matching refs:touchscreen
123 lv_nuttx_touchscreen_t * touchscreen = drv->driver_data; in conv_touch_sample() local
133 touchscreen->last_state = LV_INDEV_STATE_PRESSED; in conv_touch_sample()
136 touchscreen->last_state = LV_INDEV_STATE_RELEASED; in conv_touch_sample()
148 lv_nuttx_touchscreen_t * touchscreen = drv->driver_data; in touchscreen_read() local
159 if(touchscreen->has_last_sample) { in touchscreen_read()
160 conv_touch_sample(drv, data, &touchscreen->last_sample); in touchscreen_read()
164 if(!touchscreen_read_sample(touchscreen->fd, &sample)) { in touchscreen_read()
166 data->state = touchscreen->last_state; in touchscreen_read()
174 if(touchscreen_read_sample(touchscreen->fd, &sample)) { in touchscreen_read()
176 touchscreen->last_sample = sample; in touchscreen_read()
177 touchscreen->has_last_sample = true; in touchscreen_read()
182 touchscreen->has_last_sample = false; in touchscreen_read()
185 data->state = touchscreen->last_state; in touchscreen_read()
191 lv_nuttx_touchscreen_t * touchscreen = lv_indev_get_driver_data(indev); in touchscreen_delete_cb() local
192 if(touchscreen) { in touchscreen_delete_cb()
196 if(touchscreen->fd >= 0) { in touchscreen_delete_cb()
197 close(touchscreen->fd); in touchscreen_delete_cb()
198 touchscreen->fd = -1; in touchscreen_delete_cb()
200 lv_free(touchscreen); in touchscreen_delete_cb()
207 lv_nuttx_touchscreen_t * touchscreen; in touchscreen_init() local
210 touchscreen = lv_malloc_zeroed(sizeof(lv_nuttx_touchscreen_t)); in touchscreen_init()
211 if(touchscreen == NULL) { in touchscreen_init()
216 touchscreen->fd = fd; in touchscreen_init()
217 touchscreen->last_state = LV_INDEV_STATE_RELEASED; in touchscreen_init()
218 touchscreen->indev_drv = indev = lv_indev_create(); in touchscreen_init()
222 lv_indev_set_driver_data(indev, touchscreen); in touchscreen_init()