aboutsummaryrefslogtreecommitdiffstats
path: root/src/basecmd.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-23 11:05:09 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-04-23 13:37:49 -0400
commit37865d69a2cb427e75e2bf49e686d00f9d6a0efe (patch)
tree0c8fb500cc31d7ba10cbeb9a1319da772a5ce7b5 /src/basecmd.c
parent83eba902a362dddbeaa847a51884a760ad7de012 (diff)
downloadkutter-37865d69a2cb427e75e2bf49e686d00f9d6a0efe.tar.gz
kutter-37865d69a2cb427e75e2bf49e686d00f9d6a0efe.tar.xz
kutter-37865d69a2cb427e75e2bf49e686d00f9d6a0efe.zip
basecmd: Add debugging commands for testing communication
Add "debug_ping" and "debug_nop" testing commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/basecmd.c')
-rw-r--r--src/basecmd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/basecmd.c b/src/basecmd.c
index 5a4dc853..10b04fad 100644
--- a/src/basecmd.c
+++ b/src/basecmd.c
@@ -322,6 +322,21 @@ command_debug_write16(uint32_t *args)
DECL_COMMAND_FLAGS(command_debug_write16, HF_IN_SHUTDOWN,
"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