Пример #1
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if PL_HAS_USB_CDC
  static unsigned char cdc_buf[48];
#endif
#if PL_HAS_BLUETOOTH
  static unsigned char bluetooth_buf[48];
#endif
  static unsigned char localConsole_buf[48];
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
  
  (void)pvParameters; /* not used */
#if PL_HAS_USB_CDC
  cdc_buf[0] = '\0';
#endif
#if PL_HAS_BLUETOOTH
  bluetooth_buf[0] = '\0';
#endif
  localConsole_buf[0] = '\0';
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
  for(;;)
  {
#if CLS1_DEFAULT_SERIAL
	  (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_HAS_USB_CDC
	  (void)CLS1_ReadAndParseWithCommandTable(cdc_buf, sizeof(cdc_buf), &CDC_stdio, CmdParserTable);
#endif
#if PL_HAS_BLUETOOTH
	  (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif

#if PL_HAS_SHELL_QUEUE
/*! \todo Handle shell queue */
	  unsigned char ch;

      while((ch=SQUEUE_ReceiveChar()) && ch!='\0')
      {
#if CLS1_DEFAULT_SERIAL
    	  ioLocal->stdOut(ch);
#endif
#if PL_HAS_USB_CDC
    	  CDC_stdio.stdOut(ch);
#endif
#if PL_HAS_BLUETOOTH
    	  BT_stdio.stdOut(ch); /* copy on Bluetooth */
#endif
      }
#endif
	  FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  } /* for */
}
Пример #2
0
void SHELL_Run(void) {
  unsigned char buf[32];
  unsigned char bTbuf[32];
  
  buf[0]='\0';
  bTbuf[0]='\0';
  CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
    (void)CLS1_ReadAndParseWithCommandTable(bTbuf, sizeof(bTbuf), &BT_stdio, CmdParserTable);
  }
}
Пример #3
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if PL_HAS_SD_CARD
  bool cardMounted = FALSE;
  static FAT1_FATFS fileSystemObject;
#endif
  unsigned char buf[48];

  (void)pvParameters; /* not used */
  buf[0] = '\0';
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
#if PL_HAS_SD_CARD
    (void)FAT1_CheckCardPresence(&cardMounted,
        0 /* volume */, &fileSystemObject, CLS1_GetStdio());
    if (cardMounted) {
      //SD_GreenLed_On();
      //SD_RedLed_Off();
    } else {
      //SD_GreenLed_Off();
      //SD_RedLed_On();
    }
#endif
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
    LEDG_Neg();
  }
}
Пример #4
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
  static unsigned char localConsole_buf[48];
#if PL_CONFIG_HAS_USB_CDC
  static unsigned char cdc_buf[48];
#endif
#if PL_CONFIG_HAS_BLUETOOTH
  static unsigned char bluetooth_buf[48];
#endif
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
  
  (void)pvParameters; /* not used */
#if PL_CONFIG_HAS_USB_CDC
  cdc_buf[0] = '\0';
#endif
#if PL_CONFIG_HAS_BLUETOOTH
  bluetooth_buf[0] = '\0';
#endif
  localConsole_buf[0] = '\0';
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif

  for(;;) {
#if CLS1_DEFAULT_SERIAL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_CONFIG_HAS_USB_CDC
    (void)CLS1_ReadAndParseWithCommandTable(cdc_buf, sizeof(cdc_buf), &CDC_stdio, CmdParserTable);
#endif
#if PL_CONFIG_HAS_BLUETOOTH
    (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif

    const unsigned char *msg;

    msg = SQUEUE_ReceiveMessage();
    if (msg!=NULL) {
      CLS1_SendStr(msg, CLS1_GetStdio()->stdOut);
      FRTOS1_vPortFree((void*)msg);
    }

    FRTOS1_vTaskDelay(40/portTICK_RATE_MS);// Muss so kurz sein, da die USB-Geschichte damit getriggert wird
  } /* for */
}
Пример #5
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if PL_HAS_BLUETOOTH
    static unsigned char bTbuf[48];
#endif
    CLS1_ConstStdIOTypePtr io = CLS1_GetStdio();
    static unsigned char cmd_buf[48];
#if PL_HAS_RADIO
    static unsigned char radio_cmd_buf[48];
#endif

    (void)pvParameters; /* not used */
#if PL_HAS_MAGNETOMETER
    LSM_Init(); /* need to do this while FreeRTOS tick is active, because of Timeout handling */
#endif
#if PL_HAS_BLUETOOTH
    bTbuf[0]='\0';
#endif
    cmd_buf[0] = '\0';
#if PL_HAS_RADIO
    radio_cmd_buf[0] = '\0';
#endif
    (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
    for(;;) {
        (void)CLS1_ReadAndParseWithCommandTable(cmd_buf, sizeof(cmd_buf), io, CmdParserTable);
#if PL_HAS_SHELL_CMD_I2C
        if (I2C_ReceiveCommand(cmd_buf, sizeof(cmd_buf))==ERR_OK) {
            (void)CLS1_ParseWithCommandTable(cmd_buf, io, CmdParserTable);
        }
#endif
#if PL_HAS_RADIO
        (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), &Radio_stdio, CmdParserTable);
#endif
#if PL_HAS_BLUETOOTH
        (void)CLS1_ReadAndParseWithCommandTable(bTbuf, sizeof(bTbuf), &BT_stdio, CmdParserTable);
#endif
        HandleQueues(io);
#if PL_HAS_WATCHDOG
        WDT_IncTaskCntr(WDT_TASK_ID_SHELL, 50);
#endif
        FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
    } /* for */
}
Пример #6
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
  unsigned char buf[48];

  (void)pvParameters; /* not used */
  buf[0] = '\0';
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
    FRTOS1_vTaskDelay(pdMS_TO_TICKS(10));
  }
}
Пример #7
0
static void ShellTask(void *pvParameters) {
#if PL_CONFIG_HAS_SEGGER_RTT
  static unsigned char rtt_buf[48];
#endif
  unsigned char buf[48];

  (void)pvParameters; /* not used */
  buf[0] = '\0';
#if PL_CONFIG_HAS_SEGGER_RTT
  rtt_buf[0] = '\0';
#endif
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
#if PL_CONFIG_HAS_SEGGER_RTT
    (void)CLS1_ReadAndParseWithCommandTable(rtt_buf, sizeof(rtt_buf), &RTT_Stdio, CmdParserTable);
#endif
    FRTOS1_vTaskDelay(pdMS_TO_TICKS(10));
  }
}
Пример #8
0
static portTASK_FUNCTION(MainTask, pvParameters) {
#if PL_HAS_SHELL
  static unsigned char localConsole_buf[48];
#endif
#if PL_HAS_RSTDIO
  static unsigned char radio_cmd_buf[48];
  CLS1_ConstStdIOType *ioRemote = RSTDIO_GetStdioRx();
#endif
#if PL_HAS_RSTDIO || PL_HAS_SHELL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();
#endif
  
#if PL_HAS_RSTDIO
  radio_cmd_buf[0] = '\0';
#endif
#if PL_HAS_SHELL
  localConsole_buf[0] = '\0';
  CLS1_SendStr((unsigned char*)"nRF24L01+ Demo\r\n", ioLocal->stdOut);
#endif
  RSTACK_Init(); /* initialize stack */
  if (RAPP_SetMessageHandlerTable(handlerTable)!=ERR_OK) { /* assign application message handler */
    Err((unsigned char*)"Failed setting message handler!\r\n");
  }
  if (RAPP_SetThisNodeAddr(RNWK_ADDR_BROADCAST)!=ERR_OK) { /* set a default address */
    Err((unsigned char*)"Failed setting source address!\r\n");
  }
#if PL_HAS_SHELL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
  for(;;) {
#if PL_HAS_SHELL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_HAS_RSTDIO
    RSTDIO_Print(ioLocal); /* handle stdout/stderr messages coming in */
    (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), ioRemote, CmdParserTable);
#endif
    LED1_Neg();
    FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
  }
}
Пример #9
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if PL_HAS_RSTDIO
  static unsigned char radio_cmd_buf[48];
  CLS1_ConstStdIOType *ioRemote = RSTDIO_GetStdioRx();
#endif
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
  
  (void)pvParameters; /* not used */
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
  for(;;) {
#if CLS1_DEFAULT_SERIAL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_HAS_RSTDIO
    RSTDIO_Print(ioLocal); /* dispatch incoming messages */
    (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), ioRemote, CmdParserTable);
#endif
#if PL_HAS_BLUETOOTH
    (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif
#if PL_HAS_SHELL_QUEUE
    {
      unsigned char ch;

      while((ch=SQUEUE_ReceiveChar()) && ch!='\0') {
#if CLS1_DEFAULT_SERIAL
        ioLocal->stdOut(ch);
#endif
#if PL_HAS_BLUETOOTH
        BT_stdio.stdOut(ch); /* copy on Bluetooth */
#endif
      }
    }
#endif
     FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  } /* for */
}
Пример #10
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
  unsigned char buf[32];

  (void)pvParameters; /* not used */
  buf[0] = '\0';
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
    LEDG_Neg();
  }
}
Пример #11
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if PL_HAS_RSTDIO
  static unsigned char radio_cmd_buf[48];
  CLS1_ConstStdIOType *ioRemote = RSTDIO_GetStdioRx();
#endif
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
#if PL_HAS_SD_CARD
  bool cardMounted = FALSE;
  static FAT1_FATFS fileSystemObject;
#endif
  
  (void)pvParameters; /* not used */
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
#if PL_HAS_SD_CARD
  if (FAT1_Init()!=ERR_OK) {
    //CLS1_SendStr((uint8_t*)"FatFS Initialization failed. No card inserted?\r\n", ioLocal->stdErr);
  }
#endif
  for(;;) {
#if PL_HAS_SD_CARD
    (void)FAT1_CheckCardPresence(&cardMounted, 0 /*volume*/, &fileSystemObject, CLS1_GetStdio());
#endif
#if CLS1_DEFAULT_SERIAL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_HAS_RSTDIO
    RSTDIO_Print(ioLocal); /* dispatch incoming messages */
    (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), ioRemote, CmdParserTable);
#endif
#if PL_HAS_BLUETOOTH
    (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  } /* for */
}
Пример #12
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if BT1_PARSE_COMMAND_ENABLED
  unsigned char bTbuf[48];
#endif
  unsigned char buf[48];

  (void)pvParameters; /* not used */
#if PL_HAS_MAGNETOMETER
  LSM_Init(); /* need to do this while FreeRTOS tick is active, because of Timeout handling */
#endif
  buf[0] = '\0';
#if BT1_PARSE_COMMAND_ENABLED
  bTbuf[0]='\0';
#endif
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
#if BT1_PARSE_COMMAND_ENABLED
    (void)CLS1_ReadAndParseWithCommandTable(bTbuf, sizeof(bTbuf), &BT_stdio, CmdParserTable);
#endif
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  }
}
Пример #13
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
#if PL_HAS_RSTDIO
  static unsigned char radio_cmd_buf[96];
  CLS1_ConstStdIOType *ioRemote = RSTDIO_GetStdioRx();
#endif
  static unsigned char buf[96];
  CLS1_ConstStdIOType *ioLocal = CLS1_GetStdio();
  
  (void)pvParameters; /* not used */
#if PL_HAS_RSTDIO
  radio_cmd_buf[0] = '\0';
#endif
  buf[0] = '\0';
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
  for(;;) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), ioLocal, CmdParserTable);
#if PL_HAS_RSTDIO
    RSTDIO_Print(ioLocal); /* dispatch incoming messages */
    (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), ioRemote, CmdParserTable);
#endif
    FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
  } /* for */
}
Пример #14
0
static void ShellTask(void *pvParameters) {
  int i;

  (void)pvParameters; /* not used */
  CLS1_SendStr("RFID-RC522 Application\r\n", CLS1_GetStdio()->stdOut);
  for(i=0;i<sizeof(ios)/sizeof(ios[0]);i++) {
    ios[i].buf[0] = '\0';
  }
  for(;;) {
    for(i=0;i<sizeof(ios)/sizeof(ios[0]);i++) {
      (void)CLS1_ReadAndParseWithCommandTable(ios[i].buf, ios[i].bufSize, ios[i].stdio, CmdParserTable);
    }
    vTaskDelay(pdMS_TO_TICKS(10));
  }
}
Пример #15
0
static void ShellTask(void *pvParameters) {
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
  
  (void)pvParameters; /* not used */
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
  for(;;) {
#if CLS1_DEFAULT_SERIAL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  } /* for */
}
Пример #16
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
  bool cardMounted = FALSE;
  static FAT1_FATFS fileSystemObject;
  unsigned char buf[48];

  (void)pvParameters; /* not used */
  buf[0] = '\0';
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, CLS1_GetStdio(), CmdParserTable);
  for(;;) {
    (void)FAT1_CheckCardPresence(&cardMounted,
        0 /* volume */, &fileSystemObject, CLS1_GetStdio());
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
    FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
    LEDG_Neg();
  }
}
Пример #17
0
static portTASK_FUNCTION(ShellTask, pvParameters) {
  static unsigned char localConsole_buf[48];
#if PL_HAS_RSTDIO
  static unsigned char radio_cmd_buf[48];
  CLS1_ConstStdIOType *ioRemote = RSTDIO_GetStdioRx();
#endif
#if PL_HAS_SEGGER_RTT
  static unsigned char rtt_cmd_buf[48];
#endif
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
#if PL_HAS_SD_CARD
  bool cardMounted = FALSE;
  static FAT1_FATFS fileSystemObject;
#endif
  
  (void)pvParameters; /* not used */
#if PL_HAS_BLUETOOTH
  bluetooth_buf[0] = '\0';
#endif
#if CLS1_DEFAULT_SERIAL
  localConsole_buf[0] = '\0';
#endif
#if PL_HAS_RSTDIO
  radio_cmd_buf[0] = '\0';
#endif
#if PL_HAS_SEGGER_RTT
  rtt_cmd_buf[0] = '\0';
#endif
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
#if PL_HAS_SEGGER_RTT
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, &RTT_stdio, CmdParserTable);
#endif
#if PL_HAS_SD_CARD
  FAT1_Init();
#endif
  for(;;) {
#if PL_HAS_SD_CARD
    (void)FAT1_CheckCardPresence(&cardMounted, (unsigned char*)"0" /*volume*/, &fileSystemObject, CLS1_GetStdio());
#endif
#if CLS1_DEFAULT_SERIAL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_HAS_SEGGER_RTT
    (void)CLS1_ReadAndParseWithCommandTable(rtt_cmd_buf, sizeof(rtt_cmd_buf), &RTT_stdio, CmdParserTable);
#endif
#if PL_HAS_RSTDIO
    RSTDIO_Print(ioLocal); /* dispatch incoming messages */
    (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), ioRemote, CmdParserTable);
#endif
#if PL_HAS_BLUETOOTH
    (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif
#if PL_HAS_USB_CDC
    (void)CLS1_ReadAndParseWithCommandTable(cdc_buf, sizeof(cdc_buf), &CDC_stdio, CmdParserTable);
#endif
    FRTOS1_vTaskDelay(50/portTICK_RATE_MS);
  } /* for */
}
Пример #18
0
/* only used if not using a task for the shell */
void SHELL_Process(void) {
  (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), CLS1_GetStdio(), CmdParserTable);
#if PL_HAS_BLUETOOTH
  (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif
}
Пример #19
0
void SHELL_Parse(void) {
    (void)CLS1_ReadAndParseWithCommandTable(buf, sizeof(buf), CLS1_GetStdio(), CmdParserTable);
}
Пример #20
0
static void ShellTask(void *pvParameters) {
  static unsigned char localConsole_buf[48];
#if PL_CONFIG_HAS_USB_CDC
  static unsigned char cdc_buf[48];
#endif
#if PL_CONFIG_HAS_BLUETOOTH
  static unsigned char bluetooth_buf[48];
#endif
#if PL_CONFIG_HAS_SEGGER_RTT
  static unsigned char rtt_buf[48];
#endif
#if CLS1_DEFAULT_SERIAL
  CLS1_ConstStdIOTypePtr ioLocal = CLS1_GetStdio();  
#endif
#if PL_CONFIG_HAS_RADIO && RNET_CONFIG_REMOTE_STDIO
  static unsigned char radio_cmd_buf[48];
  CLS1_ConstStdIOType *ioRemote = RSTDIO_GetStdioRx();
#endif

  (void)pvParameters; /* not used */
#if PL_CONFIG_HAS_USB_CDC
  cdc_buf[0] = '\0';
#endif
#if PL_CONFIG_HAS_BLUETOOTH
  bluetooth_buf[0] = '\0';
#endif
#if PL_CONFIG_HAS_SEGGER_RTT
  rtt_buf[0] = '\0';
#endif
  localConsole_buf[0] = '\0';
#if CLS1_DEFAULT_SERIAL
  (void)CLS1_ParseWithCommandTable((unsigned char*)CLS1_CMD_HELP, ioLocal, CmdParserTable);
#endif
#if PL_CONFIG_HAS_RADIO && RNET_CONFIG_REMOTE_STDIO
  radio_cmd_buf[0] = '\0';
#endif
  for(;;) {
#if CLS1_DEFAULT_SERIAL
    (void)CLS1_ReadAndParseWithCommandTable(localConsole_buf, sizeof(localConsole_buf), ioLocal, CmdParserTable);
#endif
#if PL_CONFIG_HAS_USB_CDC
#if SHELL_COPY_CDC_TO_UART
    (void)CLS1_ReadAndParseWithCommandTable(cdc_buf, sizeof(cdc_buf), &CopyCDCtoUARTStdio, CmdParserTable);
#else
    (void)CLS1_ReadAndParseWithCommandTable(cdc_buf, sizeof(cdc_buf), &CDC_stdio, CmdParserTable);
#endif
#endif
#if PL_CONFIG_HAS_BLUETOOTH
    (void)CLS1_ReadAndParseWithCommandTable(bluetooth_buf, sizeof(bluetooth_buf), &BT_stdio, CmdParserTable);
#endif
#if PL_CONFIG_HAS_SEGGER_RTT
    (void)CLS1_ReadAndParseWithCommandTable(rtt_buf, sizeof(rtt_buf), &RTT_Stdio, CmdParserTable);
#endif
#if PL_CONFIG_HAS_RADIO && RNET_CONFIG_REMOTE_STDIO
    RSTDIO_Print(ioLocal); /* dispatch incoming messages */
    (void)CLS1_ReadAndParseWithCommandTable(radio_cmd_buf, sizeof(radio_cmd_buf), ioRemote, CmdParserTable);
#endif
#if PL_CONFIG_HAS_SHELL_QUEUE
#if PL_CONFIG_HAS_SQUEUE_SINGLE_CHAR
    {
        /*! \todo Handle shell queue */
      unsigned char ch;

      while((ch=SQUEUE_ReceiveChar()) && ch!='\0') {
    #if CLS1_DEFAULT_SERIAL
       ioLocal->stdOut(ch);
    #endif
    #if PL_CONFIG_HAS_BLUETOOTH
        BT_stdio.stdOut(ch); /* copy on Bluetooth */
    #endif
    #if PL_CONFIG_HAS_USB_CDC
        CDC_stdio.stdOut(ch); /* copy on USB CDC */
    #endif
      }
    }
#else /* PL_CONFIG_HAS_SQUEUE_SINGLE_CHAR */
    {
      const unsigned char *msg;

      msg = SQUEUE_ReceiveMessage();
      if (msg!=NULL) {
        CLS1_SendStr(msg, CLS1_GetStdio()->stdOut);
        FRTOS1_vPortFree((void*)msg);
      }
    }
#endif /* PL_CONFIG_HAS_SQUEUE_SINGLE_CHAR */
#endif /* PL_CONFIG_HAS_SHELL_QUEUE */
    FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
  } /* for */
}