Skip to content

Commit c6154e8

Browse files
luckyyaojinxiaoxiang781216
authored andcommitted
apps:add rpmsg_test syscmd
Signed-off-by: mazhuang <[email protected]>
1 parent 344102e commit c6154e8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

nshlib/nsh_command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static const struct cmdmap_s g_cmdmap[] =
542542

543543
#if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN)
544544
CMD_MAP("rptun", cmd_rptun, 2, 7,
545-
"<start|stop|reset|panic|dump|ping> <path|all>"
545+
"<start|stop|reset|panic|dump|ping|test> <path|all>"
546546
" [value|times length ack sleep]"),
547547
#endif
548548

nshlib/nsh_syscmds.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,12 @@ static int cmd_rpmsg_once(FAR struct nsh_vtbl_s *vtbl,
589589
cmd = RPMSGIOC_PING;
590590
val = (unsigned long)&ping;
591591
}
592+
#endif
593+
#ifdef CONFIG_RPMSG_TEST
594+
else if (strcmp(argv[1], "test") == 0)
595+
{
596+
cmd = RPMSGIOC_TEST;
597+
}
592598
#endif
593599
else if (rpmsg_cb && rpmsg_cb(&cmd, &val, argv) == OK)
594600
{
@@ -640,7 +646,7 @@ static int cmd_rpmsg_recursive(FAR struct nsh_vtbl_s *vtbl,
640646
static int cmd_rpmsg_help(FAR struct nsh_vtbl_s *vtbl, int argc,
641647
FAR char **argv)
642648
{
643-
nsh_output(vtbl, "%s <panic|dump> <path>\n", argv[0]);
649+
nsh_output(vtbl, "%s <panic|dump|test> <path>\n", argv[0]);
644650
#ifdef CONFIG_RPMSG_PING
645651
nsh_output(vtbl, "%s ping <path> <times> <length> <cmd> "
646652
"<period(ms)>\n\n", argv[0]);

0 commit comments

Comments
 (0)