/**
 * 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"] */
	char description[MAX_LEN];
} 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 */

