Skip to content

Commit 7095e16

Browse files
authoredFeb 24, 2025··
Merge pull request #2660 from fpistm/stm32_mw_usb
chore(usb): update to latest USB device and host mw
2 parents a192198 + f817247 commit 7095e16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4396
-4265
lines changed
 

‎libraries/USBDevice/inc/usbd_conf.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ extern "C" {
115115
#define USBD_DEBUG_LEVEL 0U
116116
#endif /* USBD_DEBUG_LEVEL */
117117

118+
#ifndef USBD_USER_REGISTER_CALLBACK
119+
#define USBD_USER_REGISTER_CALLBACK 0U
120+
#endif /* USBD_USER_REGISTER_CALLBACK */
121+
118122
/* ECM, RNDIS, DFU Class Config */
119123
#ifndef USBD_SUPPORT_USER_STRING_DESC
120124
#define USBD_SUPPORT_USER_STRING_DESC 0U
@@ -144,6 +148,12 @@ extern "C" {
144148
#endif /* USBD_CDC_INTERVAL */
145149

146150
/* DFU Class Config */
151+
#ifndef USBD_DFU_VENDOR_CMD_ENABLED
152+
#define USBD_DFU_VENDOR_CMD_ENABLED 0U
153+
#endif /* USBD_DFU_VENDOR_CMD_ENABLED */
154+
#ifndef USBD_DFU_VENDOR_EXIT_ENABLED
155+
#define USBD_DFU_VENDOR_EXIT_ENABLED 1U
156+
#endif /* USBD_DFU_VENDOR_EXIT_ENABLED */
147157
#ifndef USBD_DFU_MAX_ITF_NUM
148158
#define USBD_DFU_MAX_ITF_NUM 1U
149159
#endif /* USBD_DFU_MAX_ITF_NUM */

‎system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,19 @@ static uint8_t USBD_AUDIO_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnu
742742
*/
743743
static uint8_t USBD_AUDIO_IsoOutIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
744744
{
745-
UNUSED(pdev);
746-
UNUSED(epnum);
745+
USBD_AUDIO_HandleTypeDef *haudio;
746+
747+
if (pdev->pClassDataCmsit[pdev->classId] == NULL)
748+
{
749+
return (uint8_t)USBD_FAIL;
750+
}
751+
752+
haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
753+
754+
/* Prepare Out endpoint to receive next audio packet */
755+
(void)USBD_LL_PrepareReceive(pdev, epnum,
756+
&haudio->buffer[haudio->wr_ptr],
757+
AUDIO_OUT_PACKET);
747758

748759
return (uint8_t)USBD_OK;
749760
}

0 commit comments

Comments
 (0)
Please sign in to comment.