From ad5b96d584fc9962a9d8504067cd59697fb9a580 Mon Sep 17 00:00:00 2001 From: henryk Date: Fri, 29 Feb 2008 08:53:20 +0000 Subject: New cleaned-up (and then messed up again) SSC code Better layering separation git-svn-id: https://svn.openpcd.org:2342/trunk@434 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/os/usb/USB-CDC.c | 8 +++++++- openpicc/os/usb/USB-CDC.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'openpicc/os') 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 @@ -261,12 +261,18 @@ 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)) diff --git a/openpicc/os/usb/USB-CDC.h b/openpicc/os/usb/USB-CDC.h index 511c8a8..6074956 100644 --- a/openpicc/os/usb/USB-CDC.h +++ b/openpicc/os/usb/USB-CDC.h @@ -82,6 +82,7 @@ void vUSBCDCTask (void *pvParameters); /* Send cByte down the USB port. Characters are simply buffered and not sent unless the port is connected. */ void vUSBSendByte (portCHAR cByte); +void vUSBSendByte_blocking (portCHAR cByte, portTickType xTicksToWait); void vUSBSendBuffer (unsigned char *buffer, portBASE_TYPE offset, portBASE_TYPE length); portLONG vUSBRecvByte (portCHAR *cByte,portLONG size, portTickType xTicksToWait); -- cgit v1.2.3