Lines Matching +full:button +full:- +full:input +full:- +full:code
4 * SPDX-License-Identifier: Apache-2.0
26 struct lvgl_common_input_data *data = dev->data; in lvgl_button_process_event()
27 const struct lvgl_button_input_config *cfg = dev->config; in lvgl_button_process_event()
30 for (i = 0; i < cfg->num_codes; i++) { in lvgl_button_process_event()
31 if (evt->code == cfg->input_codes[i]) { in lvgl_button_process_event()
36 if (i == cfg->num_codes) { in lvgl_button_process_event()
37 LOG_DBG("Ignored input event: %u", evt->code); in lvgl_button_process_event()
41 data->pending_event.btn_id = i; in lvgl_button_process_event()
42 data->pending_event.state = evt->value ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lvgl_button_process_event()
44 if (k_msgq_put(cfg->common_config.event_msgq, &data->pending_event, K_NO_WAIT) != 0) { in lvgl_button_process_event()
45 LOG_WRN("Could not put input data into queue"); in lvgl_button_process_event()
51 struct lvgl_common_input_data *data = dev->data; in lvgl_button_input_init()
52 const struct lvgl_button_input_config *cfg = dev->config; in lvgl_button_input_init()
60 lv_indev_set_button_points(data->indev, (const lv_point_t *)cfg->coordinates); in lvgl_button_input_init()
68 "Property coordinates must contain one coordinate per input-code.")
72 LVGL_INPUT_DEFINE(inst, button, CONFIG_LV_Z_BUTTON_INPUT_MSGQ_COUNT, \
77 .common_config.event_msgq = &LVGL_INPUT_EVENT_MSGQ(inst, button), \