Content originally posted in LPCWare by larsen on Wed Jan 02 14:47:35 MST 2013
ok I think I can answer one of my own questions: <B>Yes - returning ERR_USBD_UNHANDLED in the VCOM_bulk_out_hdlr callback will hold-back further data from the host, and subsequently reading the buffer with ->ReadEP(hUsb, USB_CDC_EP_BULK_OUT, &buffer) in the worker thread, actually works nicely</B>. So the callback just sets a semphore "Data ready" in the timecritical raised interrupt level code section, and the consumer thread reads: first the semaphore, then the data.
As to the second part of my question about the code comments, I would like to have some comments - I think accurate documentation is important.