Question
cubemx stm32 usb cdc: feature request after transmitting data then call transmitt_complete callback
Posted on February 07, 2016 at 19:25
Hello,
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. Regards, Adib. -- #stm32-usb-cdc-cubemx