Modestus Moon OS  R4
CS 450 project
commhand.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_commhand (void)
 init_commhand Starts input loop and waits for shutdown code More...
 
char * get_hist_up (void)
 

Function Documentation

char* get_hist_up ( void  )
void init_commhand ( void  )

init_commhand Starts input loop and waits for shutdown code

Definition at line 200 of file commhand.c.

References s_cmd_struct::cmdFunc, exec_comm(), IDLE, in_string, initCmdArray(), MAX_LENGTH, parsed, PROMPT, serial_poll(), serial_print(), shutdown, and sys_req().

Referenced by kmain().

200  {
202 
203  *parsed[0]=0;
204  (*(cmdArray[0].cmdFunc))(&(parsed[0]));
205 
206  int i=0;//, j=0;
207  for(;i<MAX_LENGTH;i++) {
208  *parsed[i] = (char)'\0';
209  }
210  while(!shutdown) {
214  sys_req(IDLE);
215  }
216 
217 }
cmd_struct_t cmdArray[MAX_CMD_LIST_LENGTH]
Definition: commhand.c:15
#define PROMPT
Definition: input.h:8
int sys_req(int op_code)
Definition: mpx_supt.c:11
#define MAX_LENGTH
Definition: input.h:6
void initCmdArray(cmd_struct_t *arr)
Definition: commhand.c:169
int serial_print(const char *msg)
Definition: serial.c:59
void exec_comm(char in_string[MAX_LENGTH])
exec_comm Takes parsed input and calls the proper command
Definition: commhand.c:38
char parsed[MAX_IN][MAX_LENGTH]
Definition: commhand.c:9
char in_string[MAX_LENGTH]
Definition: commhand.c:10
int(* cmdFunc)(char[][MAX_LENGTH])
Definition: comm_list.h:14
char * serial_poll(char in_string[MAX_LENGTH])
Definition: serial.c:114
#define IDLE
Definition: mpx_supt.h:7
int shutdown
Definition: commhand.c:11