@@ -36,11 +36,12 @@ typedef long (*syscall_func)(void);
36
36
#endif /* __TI_COMPILER_VERSION__ */
37
37
38
38
/**
39
- * Macro to export a command along with its name, description, and options to the symbol table in MSVC.
40
- * @param name The function name associated with the command.
41
- * @param cmd The command name.
42
- * @param desc The description of the command.
43
- * @param opt The options associated with the command, used for option completion.
39
+ * @brief Macro to export a command along with its name, description, and options to the symbol table in MSVC.
40
+ *
41
+ * @param[in] name The function name associated with the command.
42
+ * @param[in] cmd The command name.
43
+ * @param[in] desc The description of the command.
44
+ * @param[in] opt The options associated with the command, used for option completion.
44
45
*/
45
46
#ifdef _MSC_VER
46
47
#define MSH_FUNCTION_EXPORT_CMD (name , cmd , desc , opt ) \
@@ -90,7 +91,7 @@ typedef long (*syscall_func)(void);
90
91
#endif /* FINSH_USING_SYMTAB */
91
92
92
93
/**
93
- * Macro definitions to simplify the declaration of exported functions or commands.
94
+ * @brief Macro definitions to simplify the declaration of exported functions or commands.
94
95
*/
95
96
#define __MSH_GET_MACRO (_1 , _2 , _3 , _FUN , ...) _FUN
96
97
#define __MSH_GET_EXPORT_MACRO (_1 , _2 , _3 , _4 , _FUN , ...) _FUN
@@ -111,51 +112,65 @@ typedef long (*syscall_func)(void);
111
112
/**
112
113
* @ingroup group_finsh
113
114
*
114
- * This macro exports a system function to finsh shell.
115
+ * @brief This macro exports a system function to finsh shell.
115
116
*
116
- * @param name the name of function.
117
- * @param desc the description of function, which will show in help.
117
+ * @param[in] name Name of function.
118
+ * @param[in] desc Description of function, which will show in help.
118
119
*/
119
120
#define FINSH_FUNCTION_EXPORT (name , desc )
120
121
121
122
/**
122
123
* @ingroup group_finsh
123
124
*
124
- * This macro exports a system function with an alias name to finsh shell.
125
+ * @brief Exports a system function with an alias name to finsh shell.
125
126
*
126
- * @param name the name of function.
127
- * @param alias the alias name of function.
128
- * @param desc the description of function, which will show in help.
127
+ * @param[in] name Name of function.
128
+ * @param[in] alias Alias name of function.
129
+ * @param[in] desc Description of function, which will show in help.
129
130
*/
130
131
#define FINSH_FUNCTION_EXPORT_ALIAS (name , alias , desc )
131
132
132
133
/**
133
134
* @ingroup group_finsh
134
135
*
135
- * This macro exports a command to module shell.
136
+ * @brief Exports a command to module shell.
137
+ *
138
+ * @b Parameters
139
+ *
140
+ * <tt>[in]</tt> @b command Name of the command.
141
+ *
142
+ * <tt>[in]</tt> @b desc Description of the command, which will show in help list.
136
143
*
137
- * param command is the name of the command.
138
- * param desc is the description of the command, which will show in help list.
139
- * param opt This is an option, enter any content to enable option completion
144
+ * <tt>[in]</tt> @b opt This is an option, enter any content to enable option completion
145
+ *
146
+ * @note This macro can be used in two ways:
147
+ * @code MSH_CMD_EXPORT(command, desc) @endcode
148
+ * or
149
+ * @code MSH_CMD_EXPORT(command, desc, opt) @endcode
140
150
*/
141
- /* MSH_CMD_EXPORT(command, desc) or MSH_CMD_EXPORT(command, desc, opt) */
142
151
#define MSH_CMD_EXPORT (...) \
143
152
__MSH_GET_MACRO(__VA_ARGS__, _MSH_FUNCTION_CMD2_OPT, \
144
153
_MSH_FUNCTION_CMD2)(__VA_ARGS__)
145
154
146
155
/**
147
156
* @ingroup group_finsh
148
157
*
149
- * This macro exports a command with alias to module shell.
158
+ * @brief Exports a command with alias to module shell.
159
+ *
160
+ * @b Parameters
161
+ *
162
+ * <tt>[in]</tt> @b command Name of the command.
150
163
*
151
- * param command is the name of the command.
152
- * param alias is the alias of the command.
153
- * param desc is the description of the command, which will show in help list.
154
- * param opt This is an option, enter any content to enable option completion
155
- * @code
156
- * #define MSH_CMD_EXPORT_ALIAS(command, alias, desc) or
157
- * #define MSH_CMD_EXPORT_ALIAS(command, alias, desc, opt)
158
- * @endcode
164
+ * <tt>[in]</tt> @b alias Alias of the command.
165
+ *
166
+ * <tt>[in]</tt> @b desc Description of the command, which will show in help list.
167
+ *
168
+ * <tt>[in]</tt> @b opt An option, enter any content to enable option completion.
169
+ *
170
+ * @note This macro can be used in two ways:
171
+ * @code #define MSH_CMD_EXPORT_ALIAS(command, alias, desc) @endcode
172
+ * or
173
+ * @code #define MSH_CMD_EXPORT_ALIAS(command, alias, desc, opt) @endcode
159
174
*/
160
175
#define MSH_CMD_EXPORT_ALIAS (...) \
161
176
__MSH_GET_EXPORT_MACRO(__VA_ARGS__, _MSH_FUNCTION_EXPORT_CMD3_OPT, \
@@ -193,22 +208,25 @@ typedef struct msh_cmd_opt
193
208
/* Command options declaration and definition macros */
194
209
195
210
/**
196
- * Declares a static array of command options for a specific command.
197
- * @param command The command associated with these options.
211
+ * @brief Declares a static array of command options for a specific command.
212
+ *
213
+ * @param[in] command The command associated with these options.
198
214
*/
199
215
#define CMD_OPTIONS_STATEMENT (command ) static struct msh_cmd_opt command##_msh_options[];
200
216
201
217
/**
202
- * Starts the definition of command options for a specific command.
203
- * @param command The command these options are associated with.
218
+ * @brief Starts the definition of command options for a specific command.
219
+ *
220
+ * @param[in] command The command these options are associated with.
204
221
*/
205
222
#define CMD_OPTIONS_NODE_START (command ) static struct msh_cmd_opt command##_msh_options[] = {
206
223
207
224
/**
208
- * Defines a single command option.
209
- * @param _id Unique identifier for the option.
210
- * @param _name The name of the option.
211
- * @param _des Description of the option.
225
+ * @brief Defines a single command option.
226
+ *
227
+ * @param[in] _id Unique identifier for the option.
228
+ * @param[in] _name The name of the option.
229
+ * @param[in] _des Description of the option.
212
230
*/
213
231
#define CMD_OPTIONS_NODE (_id , _name , _des ) {.id = _id, .name = #_name, .des = #_des},
214
232
0 commit comments