Newer
Older
ubixos / Dump / hybos / include / esh / esh.h~
@Christopher W. Olsen Christopher W. Olsen on 5 Nov 2018 806 bytes Sync
/**
 * esh.h
 */

#ifndef _ESH_H
#define _ESH_H

#define	MAX_LEN			512	/* maximum length of a command */
#define	MAX_PARAMS		20		/* maximum ammount of parameters a command may have */
#define	COMMAND_COUNT	6		/* number of commands supported */

typedef struct ESHELL_COMMANDS
{
	int minparams;								/* number of required parameters */
	int maxparams;								/* number of maximum parameters supported */
	char command[MAX_LEN];					/* command entry */
	char params[MAX_PARAMS][MAX_LEN];	/* parameters for command [index]["entry"] */
} ESHCOMMANDS;

typedef struct ESHELL_CURR_COMMAND
{
	int count;
	char param[MAX_PARAMS][MAX_LEN];
	char value[MAX_PARAMS][MAX_LEN];
} ESHCURRCOMMAND;

void keyDown(unsigned key);
void keyUp(unsigned key);
void processCommand(char *line, int count);

#endif /* _ESH_H */