 SimpleTimer timer;
 
 #define IO_BUF_SIZE 200
+char cmd_buf[IO_BUF_SIZE];
 char input_buf[IO_BUF_SIZE];
 char output_buf[IO_BUF_SIZE];
 

  timer.run();
  writeOutput();
  readSerialInput();
  //doCommand();
}

// Look for a <cr> terminated string at the beginning of input_buf

// and execute the command
void doCommand()
{
  int cmd_len = 0;
  char * cr_ptr = NULL;
  int xfer_len = 0;

  fifoCmdBufDequeueCommand(input_buf,IO_BUF_SIZE,cmd_buf,IO_BUF_SIZE);
  cmd_len = strlen(cmd_buf);
  if (cmd_len > 0)
  {
    if (cmd_len > 1)
    {
      // The only command for now is to change the prefix_string
      cr_ptr = (char *)memchr(cmd_buf,'\r',IO_BUF_SIZE);
      if (cr_ptr)
      {
        *cr_ptr = '\0'; // Do not want <cr> in prefix_string
        xfer_len = strlen(cmd_buf);
        memset(prefix_string,0,PREFIX_BUF_SIZE);
        fifoCmdBufEnqueueCommand(cmd_buf,xfer_len,prefix_string,PREFIX_BUF_SIZE);
        prefix_write_count = 0;
      }
    }
  }
}

// fifoCmdBuf* functions
