mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-08 06:35:12 +00:00
nsh_syscmds/rpmsg: add rpmsg test command support
User can use rpmsg test /dev/rpmsg/<cpuname> to test the rpmsg channel Signed-off-by: mazhuang <mazhuang@xiaomi.com>
This commit is contained in:
parent
1512f9c6e5
commit
9c4103d496
2 changed files with 8 additions and 2 deletions
|
|
@ -535,7 +535,7 @@ static const struct cmdmap_s g_cmdmap[] =
|
|||
|
||||
#if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN)
|
||||
CMD_MAP("rptun", cmd_rptun, 2, 7,
|
||||
"<start|stop|reset|panic|dump|ping> <path|all>"
|
||||
"<start|stop|reset|panic|dump|ping|test> <path|all>"
|
||||
" [value|times length ack sleep]"),
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -591,6 +591,12 @@ static int cmd_rpmsg_once(FAR struct nsh_vtbl_s *vtbl,
|
|||
cmd = RPMSGIOC_PING;
|
||||
val = (unsigned long)&ping;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_RPMSG_TEST
|
||||
else if (strcmp(argv[1], "test") == 0)
|
||||
{
|
||||
cmd = RPMSGIOC_TEST;
|
||||
}
|
||||
#endif
|
||||
else if (rpmsg_cb && rpmsg_cb(&cmd, &val, argv) == OK)
|
||||
{
|
||||
|
|
@ -642,7 +648,7 @@ static int cmd_rpmsg_recursive(FAR struct nsh_vtbl_s *vtbl,
|
|||
static int cmd_rpmsg_help(FAR struct nsh_vtbl_s *vtbl, int argc,
|
||||
FAR char **argv)
|
||||
{
|
||||
nsh_output(vtbl, "%s <panic|dump> <path>\n", argv[0]);
|
||||
nsh_output(vtbl, "%s <panic|dump|test> <path>\n", argv[0]);
|
||||
#ifdef CONFIG_RPMSG_PING
|
||||
nsh_output(vtbl, "%s ping <path> <times> <length> <cmd> "
|
||||
"<period(ms)>\n\n", argv[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue