nsh: support watch command

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2024-08-08 12:04:00 +08:00
committed by Xiang Xiao
parent e558c8e028
commit 59c21c7aee
4 changed files with 75 additions and 0 deletions

View File

@@ -664,6 +664,11 @@ static const struct cmdmap_s g_cmdmap[] =
CMD_MAP("usleep", cmd_usleep, 2, 2, "<usec>"),
#endif
#ifndef CONFIG_NSH_DISABLE_WATCH
CMD_MAP("watch", cmd_watch,
2, 6, "[-n] interval [-c] count <command>"),
#endif
#ifdef CONFIG_NET_TCP
# ifndef CONFIG_NSH_DISABLE_WGET
CMD_MAP("wget", cmd_wget, 2, 4, "[-o <local-path>] <url>"),