From 04ea404f8290577ff1332e1b98ade12f3338d16b Mon Sep 17 00:00:00 2001 From: Anders Hoglund Date: Sun, 27 Nov 2016 17:10:30 +0100 Subject: [PATCH] VCP could only handle max 256 byte frames, too small data type uint8_t. Now uint32_t. --- src/main/vcpf4/usbd_cdc_vcp.c | 2 +- src/main/vcpf4/usbd_cdc_vcp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/vcpf4/usbd_cdc_vcp.c b/src/main/vcpf4/usbd_cdc_vcp.c index 78455c00d..7c8a1abe8 100644 --- a/src/main/vcpf4/usbd_cdc_vcp.c +++ b/src/main/vcpf4/usbd_cdc_vcp.c @@ -156,7 +156,7 @@ static uint16_t VCP_Ctrl(uint32_t Cmd, uint8_t* Buf, uint32_t Len) * Output : None. * Return : None. *******************************************************************************/ -uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint8_t sendLength) +uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength) { VCP_DataTx(ptrBuffer, sendLength); return sendLength; diff --git a/src/main/vcpf4/usbd_cdc_vcp.h b/src/main/vcpf4/usbd_cdc_vcp.h index c6544ab79..7ef453588 100644 --- a/src/main/vcpf4/usbd_cdc_vcp.h +++ b/src/main/vcpf4/usbd_cdc_vcp.h @@ -36,7 +36,7 @@ __ALIGN_BEGIN USB_OTG_CORE_HANDLE USB_OTG_dev __ALIGN_END; -uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint8_t sendLength); // HJI +uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength); uint32_t CDC_Send_FreeBytes(void); uint32_t CDC_Receive_DATA(uint8_t* recvBuf, uint32_t len); // HJI uint32_t CDC_Receive_BytesAvailable(void);