treewide: add usage help to various iocsh functions
This commit is contained in:
committed by
Michael Davidsaver
parent
19daf6136f
commit
a722bb9289
@@ -17,7 +17,17 @@ void hello(const char *name) {
|
||||
/* Information needed by iocsh */
|
||||
static const iocshArg helloArg0 = {"name", iocshArgString};
|
||||
static const iocshArg *helloArgs[] = {&helloArg0};
|
||||
static const iocshFuncDef helloFuncDef = {"hello", 1, helloArgs};
|
||||
static const iocshFuncDef helloFuncDef = {
|
||||
"hello",
|
||||
1,
|
||||
helloArgs,
|
||||
#ifdef IOCSHFUNCDEF_HAS_USAGE
|
||||
"Greet the person whose name is given as first argument.\n"
|
||||
"If 'name' is unspecified, greet the world in general.\n\n"
|
||||
"Example: hello\n"
|
||||
"Example: hello stranger\n",
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Wrapper called by iocsh, selects the argument types that hello needs */
|
||||
static void helloCallFunc(const iocshArgBuf *args) {
|
||||
|
||||
@@ -28,7 +28,14 @@ int traceIocInit(void) {
|
||||
}
|
||||
|
||||
|
||||
static const iocshFuncDef traceInitFuncDef = {"traceIocInit", 0, NULL};
|
||||
static const iocshFuncDef traceInitFuncDef = {
|
||||
"traceIocInit",
|
||||
0,
|
||||
NULL,
|
||||
"Setup the 'iocInit' function to trace its different stages.\n"
|
||||
"This function must be called before 'iocInit'.\n\n"
|
||||
"Example: traceIocInit\n",
|
||||
};
|
||||
static void traceInitFunc(const iocshArgBuf *args) {
|
||||
traceIocInit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user