4 * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 * \brief Console (CLI) API
22 * \see console.c, ticon.c
31 #define CON_PARM_OPTIONAL 0x01 /* Parameter is optional */
32 #define CON_PARM_DEFVAL 0x02 /* Default value is set */
33 #define CON_PARM_RANGE 0x04 /* Range is set */
34 #define CON_PARM_STRING 0x08 /* String parm */
35 #define CON_PARM_LINE 0x10 /* String from the current parser position till EOL */
36 #define CON_PARM_SIGN 0x20 /* Signed param */
37 #define CON_PARM_NOVAL 0x80 /* Internal flag: parameter is anassigned */
38 #define CON_LAST_PARM { NULL, 0, 0, 0, 0 }
40 #define CONSOLE_TERMINAL_MODULE_ID (0)
41 #define CONSOLE_LOGGER_MODULE_ID (1)
42 #define CONSOLE_WIPP_MODULE_ID (2)
43 #define CONSOLE_G_TESTER_MODULE_ID (3)
44 #define CONSOLE_NUMBER_OF_MODULES (4)
61 typedef struct ConParm_t
63 PS8 name; /* Parameter name. Shouldn't be allocated on stack! */
64 U8 flags; /* Combination of CON_PARM_??? flags */
65 U32 low_val; /* Low val for range checking */
66 U32 hi_val; /* Hi val for range checking/max length of string */
67 U32 value; /* Value/address of string parameter */
71 typedef void (*FuncToken_t)(THandle hCuCmd, ConParm_t parm[], U16 nParms);
76 THandle Console_Create(const PS8 device_name, S32 BypassSupplicant, PS8 pSupplIfFile);
77 VOID Console_Destroy(THandle hConsole);
78 VOID Console_GetDeviceStatus(THandle hConsole);
79 VOID Console_Start(THandle hConsole);
80 VOID Console_Stop(THandle hConsole);
81 THandle Console_AddDirExt( THandle hConsole,
85 consoleErr Console_AddToken( THandle hConsole,
90 ConParm_t p_parms[] );
92 #endif /* _CONSOLE_H_ */