STM32Cube MCU Full Package for the STM32F4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
871
stars
418
forks
source link
Add description of parameter "length" in the header comment of function USBD_CDC_SetTxBuffer() #128
Parameter length of the USBD_CDC_SetTxBuffer() function does not define the size of the buffer. This latter is defined by the APP_TX_DATA_SIZE macro and can be changed from the Cube MX GUI.
Rather, it indicates the length of the data to be sent when calling USBD_CDC_TransmitPacket(). Unfortunately, this parameter has not been described in the function's header. This also explains why the USBD_CDC_SetRxBuffer() function does not have such one.
Initially discussed in #59.
Parameter
length
of theUSBD_CDC_SetTxBuffer()
function does not define the size of the buffer. This latter is defined by theAPP_TX_DATA_SIZE
macro and can be changed from the Cube MX GUI.https://github.com/STMicroelectronics/STM32CubeF4/blob/2f3b26f16559f7af495727a98253067a31182cfc/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c#L857-L858
Rather, it indicates the length of the data to be sent when calling
USBD_CDC_TransmitPacket()
. Unfortunately, this parameter has not been described in the function's header. This also explains why theUSBD_CDC_SetRxBuffer()
function does not have such one.