1.msh命令行工具支持历史命令功能。2.设备命令新增查看设备读写权限等信息。

This commit is contained in:
MacRsh
2024-01-31 22:57:10 +08:00
parent 2218b8ec71
commit 7d4c71d44a
4 changed files with 485 additions and 491 deletions

View File

@@ -17,18 +17,23 @@ extern "C" {
#ifdef MR_USING_MSH
/**
* @addtogroup Msh
* @{
*/
/**
* @brief MSH command structure.
*/
struct mr_msh_cmd
{
const char *name; /**< Name */
int (*call)(int argc, void *args); /**< Callback function */
void (*fn)(int argc, void *args); /**< Callback function */
const char *help; /**< Help information */
};
/**
* @brief Exports a MSH command.
* @brief This macro function exports a MSH command.
*
* @param name The name of the command.
* @param fn The callback function.
@@ -65,11 +70,6 @@ struct mr_msh_cmd
#define MR_MSH_COLOR_GREEN(str) str
#endif /* MR_USING_MSH_PRINTF_COLOR */
/**
* @addtogroup Msh.
* @{
*/
int mr_msh_printf_output(const char *buf, size_t size);
int mr_msh_input(char *c);
int mr_msh_printf(const char *fmt, ...);
void mr_msh_set_prompt(char *prompt);