Content originally posted in LPCWare by SeleneSW on Wed Dec 30 09:38:39 MST 2015
Hi wlamers,
In your lusb_BulkDataOUT_Hdlr function you do an USBD_API->hw->ReadEP call, this call empties the USB peripheral buffer, and so it will be ready to recieve new data.
You could do a check if you already read the data in the pUSB->pRxBuf buffer, and if not, you could skip the USBD_API->hw->ReadEP call for now, and you'll do it later when you are ready to recieve.