Skip to content

Commit

Permalink
usbcdc: increased ringbuffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
schneider42 committed Dec 22, 2011
1 parent 68148e3 commit 3904870
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firmware/usbcdc/cdcuser.c
Expand Up @@ -41,7 +41,7 @@ volatile unsigned char CDC_DepInEmpty = 1; // Data IN EP is
much faster than UART transmits
*---------------------------------------------------------------------------*/
/* Buffer masks */
#define CDC_BUF_SIZE (64) // Output buffer in bytes (power 2)
#define CDC_BUF_SIZE (128) // Output buffer in bytes (power 2)
// large enough for file transfer
#define CDC_BUF_MASK (CDC_BUF_SIZE-1ul)

Expand Down Expand Up @@ -342,6 +342,8 @@ void CDC_BulkIn(void)
{
int numBytesRead, numBytesAvail;
CDC_InBufAvailChar(&numBytesAvail);
if( numBytesAvail > 64 )
numBytesAvail = 64;
numBytesRead = CDC_RdInBuf((char*)&BulkBufIn[0], &numBytesAvail);
// send over USB
if (numBytesRead > 0) {
Expand Down

0 comments on commit 3904870

Please sign in to comment.