1 // SPDX-License-Identifier: GPL-2.0+
3 * The 'conitrace' command prints the codes received from the console input as
9 #include <linux/delay.h>
11 static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc,
16 printf("Waiting for your input\n");
17 printf("To terminate type 'x'\n");
19 /* Empty input buffer */
26 if (first && (c == 'x' || c == 'X'))
32 /* 10 ms delay - serves to detect separate keystrokes */
40 return CMD_RET_SUCCESS;
43 U_BOOT_LONGHELP(conitrace, "");
46 conitrace, 2, 0, do_conitrace,
47 "trace console input",
48 conitrace_help_text, NULL