1 // SPDX-License-Identifier: GPL-2.0+
3 * The 'conitrace' command prints the codes received from the console input as
6 * Copyright (c) 2018, Heinrich Schuchardt <xypron.glpk@gmx.de>
11 static int do_conitrace(cmd_tbl_t *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 /* 1 ms delay - serves to detect separate keystrokes */
40 return CMD_RET_SUCCESS;
43 #ifdef CONFIG_SYS_LONGHELP
44 static char conitrace_help_text[] = "";
48 conitrace, 2, 0, do_conitrace,
49 "trace console input",
50 conitrace_help_text, NULL