Closed mnusa2 closed 4 years ago
Just to note, the file is for Firmware.
This is just during initialization. It sets a TX buffer of 0 length (so any pointer is fine here).
Later when there is something to send (in "CDC_Transmit_FS") you can see that the buffer supplied from caller is given to USBD_CDC_SetTxBuffer.
So all is fine.
While moving the sources to STM32CubeIDE I noticed somewhat doubtful code. This may be for a purpose or an error. I have not noticed any erroneous behaviour based on this.
USBD_CDC_SetTxBuffer() and USBD_CDC_SetRxBuffer() use the same buffer address UserRxBufferFS.
From usbd_cdc_if.c istarting line 150. / Private functions ---------------------------------------------------------/ /**