diff options
Diffstat (limited to 'openpicc/os/usb/USB-CDC.c')
-rw-r--r-- | openpicc/os/usb/USB-CDC.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openpicc/os/usb/USB-CDC.c b/openpicc/os/usb/USB-CDC.c index 13435b4..1b840c9 100644 --- a/openpicc/os/usb/USB-CDC.c +++ b/openpicc/os/usb/USB-CDC.c @@ -262,11 +262,17 @@ vUSBCDCTask (void *pvParameters) void vUSBSendByte (portCHAR cByte) { + vUSBSendByte_blocking(cByte, usbNO_BLOCK); +} + +void +vUSBSendByte_blocking (portCHAR cByte, portTickType xTicksToWait) +{ char chunk[CHUNK_SIZE]; chunk[0] = 1; chunk[1] = cByte; /* Queue the byte to be sent. The USB task will send it. */ - xQueueSend (xTxCDC, &chunk, usbNO_BLOCK); + xQueueSend (xTxCDC, &chunk, xTicksToWait); } #define MIN(a,b) ((a)>(b)?(b):(a)) |