void cmdPoll() { #if defined CFG_PRINTF_UART while (uartRxBufferDataPending()) { uint8_t c = uartRxBufferRead(); cmdRx(c); } #endif #if defined CFG_PRINTF_USBCDC int numBytesToRead, numBytesRead, numAvailByte; CDC_OutBufAvailChar (&numAvailByte); if (numAvailByte > 0) { numBytesToRead = numAvailByte > 32 ? 32 : numAvailByte; numBytesRead = CDC_RdOutBuf (&usbcdcBuf[0], &numBytesToRead); int i; for (i = 0; i < numBytesRead; i++) { cmdRx(usbcdcBuf[i]); } } #endif }
void cmdPoll() { #if defined CFG_PRINTF_UART while (uartRxBufferDataPending()) { uint8_t c = uartRxBufferRead(); cmdRx(c); } #endif }
void cliPoll() { #if defined CFG_BSP_PRINTF_UART while (uartRxBufferDataPending()) { uint8_t c = uartRxBufferRead(); cliRx(c); } #endif #if defined(CFG_LIB_USB) && defined(CFG_LIB_PRINTF_USBCDC) if (usb_isConfigured()) { uint8_t c; while(usb_cdc_getc(&c)) { cliRx(c); } } #endif }