]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - cmd/conitrace.c
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>
10 #include <linux/delay.h>
12 static int do_conitrace(struct cmd_tbl
*cmdtp
, int flag
, int argc
,
17 printf("Waiting for your input\n");
18 printf("To terminate type 'x'\n");
20 /* Empty input buffer */
27 if (first
&& (c
== 'x' || c
== 'X'))
33 /* 1 ms delay - serves to detect separate keystrokes */
41 return CMD_RET_SUCCESS
;
44 #ifdef CONFIG_SYS_LONGHELP
45 static char conitrace_help_text
[] = "";
49 conitrace
, 2, 0, do_conitrace
,
50 "trace console input",
51 conitrace_help_text
, NULL