1.msh优化,简化使用流程。

2.新增回显命令。
This commit is contained in:
MacRsh
2024-01-10 16:59:03 +08:00
parent 4eeb73295e
commit 9cdf96e001
2 changed files with 128 additions and 31 deletions

View File

@@ -59,24 +59,15 @@ struct mr_msh_cmd
#define MR_MSH_GET_ARG(index) \
(((index) < (argc)) ? (((const char **)(argv))[index]) : MR_NULL)
/**
* @brief This macro function prints a formatted string.
*
* @param fmt The format string.
* @param ... The arguments.
*/
#define mr_msh_printf(fmt, ...) mr_printf(fmt, ##__VA_ARGS__)
/**
* @addtogroup Msh.
* @{
*/
void mr_msh_recv_char(char c);
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_handle(void);
/** @} */
#else
#define MR_MSH_EXPORT(name, fn, help, level)
#define MR_MSH_CMD_EXPORT(name, fn, help)
#define mr_msh_printf(...)
#endif /* MR_USING_MSH */
#ifdef __cplusplus