aboutsummaryrefslogtreecommitdiff
path: root/debugger/include
diff options
context:
space:
mode:
authorTarek El-Sherbiny <tarek.el-sherbiny@arm.com>2020-01-31 14:19:47 +0000
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-03-23 14:22:21 +0000
commitaa5531fdf98cfede4ccac436959c0a235ad661ed (patch)
tree6cc3b965915115bc3bb568949d1ce86fcf00db52 /debugger/include
parent1789c05abe0d205b1104062d0c7d2ae95fc24297 (diff)
dbg: Convert the cli commands array to a linked list
This patch gives the ability to add new cli commands at run time. Any new command can be added by calling the cli_dbg_register_command function after filling the command struct members accordingly. The new command will be added to the commands linked list. At startup, only the common cli commands will be available to the user. Any additional command must be register to be available in the cli. Change-Id: Ib81a70f4f7737050d0ea02692b0ef34773e25c8b Signed-off-by: Tarek El-Sherbiny <tarek.el-sherbiny@arm.com>
Diffstat (limited to 'debugger/include')
-rw-r--r--debugger/include/cli.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/debugger/include/cli.h b/debugger/include/cli.h
index 74e89fed..f169bbcd 100644
--- a/debugger/include/cli.h
+++ b/debugger/include/cli.h
@@ -272,4 +272,14 @@ uint32_t cli_getline(
*/
int32_t cli_strncmp(const char *s1, const char *s2, uint32_t limit);
+/*!
+ * \brief Register a new CLI command at run time
+ *
+ * \param new_cmd The new command to register.
+ *
+ * \retval CLI_SUCCESS Operation succeeded.
+ * \retval CLI_ERR_MEM Not enough memory.
+ */
+int cli_command_register(cli_command_st new_cmd);
+
#endif /* _CLI_H_ */