basecmd: Add debugging commands for testing communication

Add "debug_ping" and "debug_nop" testing commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-04-23 11:05:09 -04:00
parent 83eba902a3
commit 37865d69a2
1 changed files with 15 additions and 0 deletions

View File

@ -322,6 +322,21 @@ command_debug_write16(uint32_t *args)
DECL_COMMAND_FLAGS(command_debug_write16, HF_IN_SHUTDOWN, DECL_COMMAND_FLAGS(command_debug_write16, HF_IN_SHUTDOWN,
"debug_write16 addr=%u val=%u"); "debug_write16 addr=%u val=%u");
void
command_debug_ping(uint32_t *args)
{
uint8_t len = args[0];
char *data = (void*)(size_t)args[1];
sendf("pong data=%*s", len, data);
}
DECL_COMMAND_FLAGS(command_debug_ping, HF_IN_SHUTDOWN, "debug_ping data=%*s");
void
command_debug_nop(uint32_t *args)
{
}
DECL_COMMAND_FLAGS(command_debug_nop, HF_IN_SHUTDOWN, "debug_nop data=%*s");
/**************************************************************** /****************************************************************
* Misc commands * Misc commands