Lines Matching +full:button +full:- +full:input +full:- +full:code
4 * SPDX-License-Identifier: Apache-2.0
25 struct lvgl_common_input_data *data = dev->data; in lvgl_encoder_process_event()
26 const struct lvgl_encoder_input_config *cfg = dev->config; in lvgl_encoder_process_event()
28 if (evt->code == cfg->rotation_input_code) { in lvgl_encoder_process_event()
29 data->pending_event.enc_diff = evt->value; in lvgl_encoder_process_event()
30 } else if (evt->code == cfg->button_input_code) { in lvgl_encoder_process_event()
31 data->pending_event.state = in lvgl_encoder_process_event()
32 evt->value ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lvgl_encoder_process_event()
33 data->pending_event.enc_diff = 0; in lvgl_encoder_process_event()
34 data->pending_event.key = LV_KEY_ENTER; in lvgl_encoder_process_event()
36 LOG_DBG("Ignored input event: %u", evt->code); in lvgl_encoder_process_event()
40 if (k_msgq_put(cfg->common_config.event_msgq, &data->pending_event, K_NO_WAIT) != 0) { in lvgl_encoder_process_event()
41 LOG_WRN("Could not put input data into queue"); in lvgl_encoder_process_event()
50 #define BUTTON_CODE(inst) DT_INST_PROP_OR(inst, button_input_code, -1)
55 "Property rotation-input-code needs to be between 0 and 65536."); \
58 "Property button-input-code needs to be between 0 and 65536."); \
60 "Property rotation-input-code and button-input-code should not be equal.")