Lines Matching +full:input +full:- +full:event +full:- +full:code

4  * SPDX-License-Identifier: Apache-2.0
8 #include <zephyr/input/input.h>
10 #include <zephyr/input/input_kbd_matrix.h>
16 LOG_MODULE_DECLARE(input);
39 shell_info(sh, "Input event dumping enabled"); in input_cmd_dump()
62 LOG_INF("input event: dev=%-16s %3s type=%2x code=%3d value=%d", in input_dump_cb()
63 evt->dev ? evt->dev->name : "NULL", in input_dump_cb()
64 evt->sync ? "SYN" : "", in input_dump_cb()
65 evt->type, in input_dump_cb()
66 evt->code, in input_dump_cb()
67 evt->value); in input_dump_cb()
77 uint32_t type, code, value; in input_cmd_report() local
96 return -EINVAL; in input_cmd_report()
99 code = shell_strtoul(argv[2], 0, &err); in input_cmd_report()
104 if (code > UINT16_MAX) { in input_cmd_report()
106 return -EINVAL; in input_cmd_report()
115 input_report(NULL, type, code, value, sync, K_FOREVER); in input_cmd_report()
133 const struct input_kbd_matrix_common_config *cfg = kbd_matrix_state_dev->config; in kbd_matrix_state_log_entry()
140 memset(blank, '-', sizeof(blank) - 1); in kbd_matrix_state_log_entry()
141 blank[sizeof(blank) - 1] = '\0'; in kbd_matrix_state_log_entry()
143 for (int i = 0; i < cfg->col_size; i++) { in kbd_matrix_state_log_entry()
144 char *sep = (i + 1) < cfg->col_size ? " " : ""; in kbd_matrix_state_log_entry()
151 size -= ret; in kbd_matrix_state_log_entry()
164 kbd_matrix_state_dev->name, header, kbd_matrix_buf, count); in kbd_matrix_state_log_entry()
175 if (kbd_matrix_state_dev == NULL || kbd_matrix_state_dev != evt->dev) { in kbd_matrix_state_log()
179 cfg = kbd_matrix_state_dev->config; in kbd_matrix_state_log()
181 switch (evt->code) { in kbd_matrix_state_log()
183 col = evt->value; in kbd_matrix_state_log()
186 row = evt->value; in kbd_matrix_state_log()
189 val = evt->value; in kbd_matrix_state_log()
193 if (!evt->sync) { in kbd_matrix_state_log()
197 if (col > (CONFIG_INPUT_SHELL_KBD_MATRIX_STATE_MAX_COLS - 1)) { in kbd_matrix_state_log()
202 if (col > (cfg->col_size - 1)) { in kbd_matrix_state_log()
207 if (row > (cfg->row_size - 1)) { in kbd_matrix_state_log()
228 kbd_matrix_state_log_entry("key-mask", in input_cmd_kbd_matrix_state_dump()
240 return -ENODEV; in input_cmd_kbd_matrix_state_dump()
245 kbd_matrix_state_dev->name); in input_cmd_kbd_matrix_state_dump()
246 return -EINVAL; in input_cmd_kbd_matrix_state_dump()
253 shell_info(sh, "Keyboard state logging enabled for %s", dev->name); in input_cmd_kbd_matrix_state_dump()
262 entry->syntax = (dev != NULL) ? dev->name : NULL; in device_name_get()
263 entry->handler = NULL; in device_name_get()
264 entry->help = NULL; in device_name_get()
265 entry->subcmd = NULL; in device_name_get()
275 "Enable event dumping\n"
287 "Trigger an input report event\n"
288 "usage: report <type> <code> <value> [<sync>]",
292 SHELL_CMD_REGISTER(input, &sub_input_cmds, "Input commands", NULL);