AnsweredAssumed Answered

cubemx stm32 usb cdc: feature request after transmitting data then call transmitt_complete callback

Question asked by adib on Feb 7, 2016
Latest reply on Feb 10, 2016 by adib

I use the USB device CDC class. I do transmit data.
But while I give the the data to the CDC_Transmit_FS function.
The application must not overwrite data on those buffer until the transmit is finished.
Potentially there are several USB packets to be sent until all data transmitted.

What I miss is a trigger for the application to reuse the buffer used in the CDC_Transmit_FS function.

I assume in the file usbd_cdc.c in function USBD_CDC_DataIn there you could put a function call to callback function: CDC_TransmitCplt_FS
the callback function could be added to USBD_CDC_ItfTypeDef.
This way it could callback to usbd_cdc_if.c module.

Right now after automated code generation I have to patch usbd_cdc.c and usbd_cdc_if.c
in order get signals data_received and data_transmit_completed into the application.