@@ -23,7 +23,7 @@ typedef long (*syscall_func)(void);
2323#endif
2424#ifdef FINSH_USING_DESCRIPTION
2525#ifdef _MSC_VER
26- #define FINSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
26+ #define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
2727 const char __fsym_##cmd##_name[] = #cmd; \
2828 const char __fsym_##cmd##_desc[] = #desc; \
2929 __declspec(allocate("FSymTab$f")) \
@@ -36,7 +36,7 @@ typedef long (*syscall_func)(void);
3636#pragma comment(linker, "/merge:FSymTab=mytext")
3737
3838#elif defined(__TI_COMPILER_VERSION__ )
39- #define FINSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
39+ #define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
4040 __TI_FINSH_EXPORT_FUNCTION(__fsym_##cmd); \
4141 const char __fsym_##cmd##_name[] = #cmd; \
4242 const char __fsym_##cmd##_desc[] = #desc; \
@@ -48,7 +48,7 @@ typedef long (*syscall_func)(void);
4848 };
4949
5050#else
51- #define FINSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
51+ #define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
5252 const char __fsym_##cmd##_name[] RT_SECTION(".rodata.name") = #cmd; \
5353 const char __fsym_##cmd##_desc[] RT_SECTION(".rodata.name") = #desc; \
5454 RT_USED const struct finsh_syscall __fsym_##cmd RT_SECTION("FSymTab")= \
@@ -61,7 +61,7 @@ typedef long (*syscall_func)(void);
6161#endif
6262#else
6363#ifdef _MSC_VER
64- #define FINSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
64+ #define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
6565 const char __fsym_##cmd##_name[] = #cmd; \
6666 __declspec(allocate("FSymTab$f")) \
6767 const struct finsh_syscall __fsym_##cmd = \
@@ -72,7 +72,7 @@ typedef long (*syscall_func)(void);
7272#pragma comment(linker, "/merge:FSymTab=mytext")
7373
7474#elif defined(__TI_COMPILER_VERSION__ )
75- #define FINSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
75+ #define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
7676 __TI_FINSH_EXPORT_FUNCTION(__fsym_##cmd); \
7777 const char __fsym_##cmd##_name[] = #cmd; \
7878 const struct finsh_syscall __fsym_##cmd = \
@@ -82,7 +82,7 @@ typedef long (*syscall_func)(void);
8282 };
8383
8484#else
85- #define FINSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
85+ #define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc ) \
8686 const char __fsym_##cmd##_name[] = #cmd; \
8787 RT_USED const struct finsh_syscall __fsym_##cmd RT_SECTION("FSymTab")= \
8888 { \
@@ -102,8 +102,7 @@ typedef long (*syscall_func)(void);
102102 * @param name the name of function.
103103 * @param desc the description of function, which will show in help.
104104 */
105- #define FINSH_FUNCTION_EXPORT (name , desc ) \
106- FINSH_FUNCTION_EXPORT_CMD(name, name, desc)
105+ #define FINSH_FUNCTION_EXPORT (name , desc )
107106
108107/**
109108 * @ingroup finsh
@@ -114,8 +113,7 @@ typedef long (*syscall_func)(void);
114113 * @param alias the alias name of function.
115114 * @param desc the description of function, which will show in help.
116115 */
117- #define FINSH_FUNCTION_EXPORT_ALIAS (name , alias , desc ) \
118- FINSH_FUNCTION_EXPORT_CMD(name, alias, desc)
116+ #define FINSH_FUNCTION_EXPORT_ALIAS (name , alias , desc )
119117
120118/**
121119 * @ingroup finsh
@@ -126,9 +124,9 @@ typedef long (*syscall_func)(void);
126124 * @param desc the description of command, which will show in help.
127125 */
128126#define MSH_CMD_EXPORT (command , desc ) \
129- FINSH_FUNCTION_EXPORT_CMD (command, __cmd_## command, desc)
127+ MSH_FUNCTION_EXPORT_CMD (command, command, desc)
130128#define MSH_CMD_EXPORT_ALIAS (command , alias , desc ) \
131- FINSH_FUNCTION_EXPORT_ALIAS (command, __cmd_## alias, desc)
129+ MSH_FUNCTION_EXPORT_CMD (command, alias, desc)
132130
133131/* system call table */
134132struct finsh_syscall
0 commit comments