diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-29 08:53:20 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-29 08:53:20 +0000 |
commit | ad5b96d584fc9962a9d8504067cd59697fb9a580 (patch) | |
tree | a79230629a87dfbb65603d806467499ec632e4e8 /openpicc/os | |
parent | 4b03b310ffda11b017ce5166012a7139b09eee90 (diff) |
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
Diffstat (limited to 'openpicc/os')
-rw-r--r-- | openpicc/os/usb/USB-CDC.c | 8 | ||||
-rw-r--r-- | openpicc/os/usb/USB-CDC.h | 1 |
2 files changed, 8 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)) 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); |