예제 #1
0
/*!
 * \brief Called from the application task. This function checks the Radio RX queue and checks if it contains stdio messages.
 * If so, it dispatches it to the corresponding shell queues.
 */
void RSTDIO_Print(CLS1_ConstStdIOTypePtr io) {
  unsigned char ch;

  for(;;) { /* breaks */
    ch = RSTDIO_ReceiveChar(RSTDIO_RxStdOutQ);
    if(ch=='\0') {
      break; /* get out of for loop */
    }
    io->stdOut(ch); /* output character */
  }
  for(;;) { /* breaks */
    ch = RSTDIO_ReceiveChar(RSTDIO_RxStdErrQ);
    if(ch=='\0') {
      break; /* get out of for loop */
    }
    io->stdErr(ch); /* output character */
  }
}
예제 #2
0
static void HandleQueues(CLS1_ConstStdIOTypePtr io) {
#if PL_HAS_QUEUE
    unsigned char ch;

    for(;;) { /* breaks */
        ch=QUEUE_ReceiveChar(QUEUE_StdOut);
        if(ch=='\0') {
            break; /* get out of for loop */
        }
        io->stdOut(ch); /* output character */
    }
    for(;;) { /* breaks */
        ch=QUEUE_ReceiveChar(QUEUE_StdErr);
        if(ch=='\0') {
            break; /* get out of for loop */
        }
        io->stdErr(ch); /* output character */
    }
#endif
}