Reading more than 64 bytes and using a Circular buffer suing USBD API on lpc43xx

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by pra18 on Wed Nov 12 09:31:46 MST 2014
I am migrating from UART to a USB CDC on my custom board. The UART on my custom board is handling 256 byte receptions currently and also on USB CDC will this required to be supported.

The Bulk endpoint maximum is 64 bytes in which case, for 256 byte transfers there needs to be some mechanism to handle mostly a circle buffer.

I see that in  the USB VCOM example of lpcopen 2_0_12 , and in  Bulk EVT_OUT handler code , the ReadEP is called and this is where the functionality needs to be added to support more than 64 bytes  and also there is needed a helper function like Read to assist this Build EVT_OUT.I see something like VCOMBRead in that example.

Any suggestions how this can be achieved and any examples using a circular buffer that can be referred to in this case?