USB receive data
Hi all,
i have a problem to receive data from USB.
use STM32L476.
As for the transmission, everything works smoothly. but when i try to send a packet i can't find the arriving data, the byte length is correct, but i don't understand where the buffer is pointing to read my data. I am attaching the code I wrote:
static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len)
{
/* USER CODE BEGIN 6 */
uint32_t received_data_size;
USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]);
USBD_CDC_ReceivePacket(&hUsbDeviceFS);
received_data_size = *Len; // my
memcpy(aRxBufferUSB, Buf, received_data_size); // my
CDC_Transmit_FS(Buf, *Len); // try echo
return (USBD_OK);
/* USER CODE END 6 */
}
aRxBufferUSB this is my external buffer.
can someone help
thanks
