#ifndef _HIDO_SHELL_H_
|
#define _HIDO_SHELL_H_
|
|
#include "HIDO_TypeDef.h"
|
#include "HIDO_Input.h"
|
|
#define SHELL_CMD_MAX_COUNT 80
|
|
typedef HIDO_INT32 (*HIDO_ShellCmdFunc)(HIDO_INT32, HIDO_CHAR **);
|
|
typedef struct ShellCmdStruct
|
{
|
const HIDO_CHAR *m_pcName;
|
HIDO_ShellCmdFunc m_fnProc;
|
}HIDO_ShellCmdStruct;
|
|
#define HIDO_ShellPrintf(...)\
|
{\
|
if(HIDO_ShellGetInput() != HIDO_NULL && (HIDO_ShellGetInput()->m_fnPrintf) != HIDO_NULL)\
|
{\
|
HIDO_ShellGetInput()->m_fnPrintf(__VA_ARGS__);\
|
}\
|
}
|
|
HIDO_UINT32 HIDO_ShellGetCmdCount(void);
|
HIDO_VOID HIDO_ShellSetInput(HIDO_InputStruct *_pstInput);
|
HIDO_InputStruct* HIDO_ShellGetInput(void);
|
HIDO_INT32 HIDO_ShellExecute(HIDO_CHAR *_pcShellCmd);
|
const HIDO_CHAR* HIDO_ShellGetCmdName(HIDO_UINT32 _u32Index);
|
HIDO_INT32 HIDO_ShellCmdRegister(const HIDO_ShellCmdStruct *_pstShellCmd, HIDO_UINT32 _u32ShellCmdCnt);
|
|
#endif /* _HIDO_SHELL_H_ */
|