forked from stm/stm32-mw-usb-device
Release v2.11.4
This commit is contained in:
@@ -296,7 +296,7 @@ USBD_StatusTypeDef USBD_RegisterClassComposite(USBD_HandleTypeDef *pdev, USBD_Cl
|
||||
*/
|
||||
USBD_StatusTypeDef USBD_UnRegisterClassComposite(USBD_HandleTypeDef *pdev)
|
||||
{
|
||||
USBD_StatusTypeDef ret = USBD_FAIL;
|
||||
USBD_StatusTypeDef ret = USBD_OK;
|
||||
uint8_t idx1;
|
||||
uint8_t idx2;
|
||||
|
||||
@@ -590,6 +590,8 @@ USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev,
|
||||
USBD_StatusTypeDef ret = USBD_OK;
|
||||
uint8_t idx;
|
||||
|
||||
UNUSED(pdata);
|
||||
|
||||
if (epnum == 0U)
|
||||
{
|
||||
pep = &pdev->ep_out[0];
|
||||
@@ -599,8 +601,9 @@ USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev,
|
||||
if (pep->rem_length > pep->maxpacket)
|
||||
{
|
||||
pep->rem_length -= pep->maxpacket;
|
||||
pep->pbuffer += pep->maxpacket;
|
||||
|
||||
(void)USBD_CtlContinueRx(pdev, pdata, MIN(pep->rem_length, pep->maxpacket));
|
||||
(void)USBD_CtlContinueRx(pdev, pep->pbuffer, MAX(pep->rem_length, pep->maxpacket));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -685,6 +688,8 @@ USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev,
|
||||
USBD_StatusTypeDef ret;
|
||||
uint8_t idx;
|
||||
|
||||
UNUSED(pdata);
|
||||
|
||||
if (epnum == 0U)
|
||||
{
|
||||
pep = &pdev->ep_in[0];
|
||||
@@ -694,8 +699,9 @@ USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev,
|
||||
if (pep->rem_length > pep->maxpacket)
|
||||
{
|
||||
pep->rem_length -= pep->maxpacket;
|
||||
pep->pbuffer += pep->maxpacket;
|
||||
|
||||
(void)USBD_CtlContinueSendData(pdev, pdata, pep->rem_length);
|
||||
(void)USBD_CtlContinueSendData(pdev, pep->pbuffer, pep->rem_length);
|
||||
|
||||
/* Prepare endpoint for premature end of transfer */
|
||||
(void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
|
||||
|
||||
@@ -65,7 +65,7 @@ USBD_DescriptorsTypeDef Class_Desc =
|
||||
USBD_Class_ConfigStrDescriptor,
|
||||
USBD_Class_InterfaceStrDescriptor,
|
||||
#if (USBD_CLASS_USER_STRING_DESC == 1)
|
||||
USBD_CLASS_UserStrDescriptor,
|
||||
USBD_Class_UserStrDescriptor,
|
||||
#endif /* USB_CLASS_USER_STRING_DESC */
|
||||
|
||||
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
|
||||
|
||||
@@ -89,6 +89,7 @@ USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
|
||||
/* Set EP0 State */
|
||||
pdev->ep0_state = USBD_EP0_DATA_IN;
|
||||
pdev->ep_in[0].total_length = len;
|
||||
pdev->ep_in[0].pbuffer = pbuf;
|
||||
|
||||
#ifdef USBD_AVOID_PACKET_SPLIT_MPS
|
||||
pdev->ep_in[0].rem_length = 0U;
|
||||
@@ -133,6 +134,7 @@ USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
|
||||
/* Set EP0 State */
|
||||
pdev->ep0_state = USBD_EP0_DATA_OUT;
|
||||
pdev->ep_out[0].total_length = len;
|
||||
pdev->ep_out[0].pbuffer = pbuf;
|
||||
|
||||
#ifdef USBD_AVOID_PACKET_SPLIT_MPS
|
||||
pdev->ep_out[0].rem_length = 0U;
|
||||
|
||||
Reference in New Issue
Block a user