Revision 4c72a54c core/inc/aos_shell.h
core/inc/aos_shell.h | ||
---|---|---|
195 | 195 |
|
196 | 196 |
/** |
197 | 197 |
* @brief Shell command calback type. |
198 |
* |
|
199 |
* @param[in] stream Stream to print to. |
|
200 |
* @param[in] argc Number of arguments. |
|
201 |
* @param[in] argv List of arguments. |
|
198 | 202 |
*/ |
199 | 203 |
typedef int (*aos_shellcmdcb_t)(BaseSequentialStream* stream, int argc, char* argv[]); |
200 | 204 |
|
... | ... | |
373 | 377 |
/* MACROS */ |
374 | 378 |
/******************************************************************************/ |
375 | 379 |
|
380 |
/** |
|
381 |
* @brief Initializes a shell command object. |
|
382 |
* |
|
383 |
* @param[in] var Name of the object variable to be initialized. |
|
384 |
* @param[in] name Shell command name. |
|
385 |
* @param[in] callback Pointer to the callback function. |
|
386 |
*/ |
|
387 |
#define AOS_SHELL_COMMAND(var, name, callback) aos_shellcommand_t var = { \ |
|
388 |
/* name */ name, \ |
|
389 |
/* callback */ callback, \ |
|
390 |
/* next */ NULL, \ |
|
391 |
} |
|
392 |
|
|
376 | 393 |
/******************************************************************************/ |
377 | 394 |
/* EXTERN DECLARATIONS */ |
378 | 395 |
/******************************************************************************/ |
Also available in: Unified diff