Skip to content

Commit 5061f11

Browse files
committed
chore(system): update stm32_mw_usb_device to v2.11.1
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 2718bf5 commit 5061f11

File tree

82 files changed

+15393
-4039
lines changed

Some content is hidden

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

82 files changed

+15393
-4039
lines changed

system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc/usbd_audio.h

Lines changed: 122 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
******************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
10-
* All rights reserved.</center></h2>
9+
* Copyright (c) 2015 STMicroelectronics.
10+
* All rights reserved.
1111
*
12-
* This software component is licensed by ST under Ultimate Liberty license
13-
* SLA0044, the "License"; You may not use this file except in compliance with
14-
* the License. You may obtain a copy of the License at:
15-
* www.st.com/SLA0044
12+
* This software is licensed under terms that can be found in the LICENSE file
13+
* in the root directory of this software component.
14+
* If no LICENSE file comes with this software, it is provided AS-IS.
1615
*
1716
******************************************************************************
1817
*/
@@ -58,7 +57,10 @@ extern "C" {
5857
#define AUDIO_FS_BINTERVAL 0x01U
5958
#endif /* AUDIO_FS_BINTERVAL */
6059

60+
#ifndef AUDIO_OUT_EP
6161
#define AUDIO_OUT_EP 0x01U
62+
#endif /* AUDIO_OUT_EP */
63+
6264
#define USB_AUDIO_CONFIG_DESC_SIZ 0x6DU
6365
#define AUDIO_INTERFACE_DESC_SIZE 0x09U
6466
#define USB_AUDIO_DESC_SIZ 0x09U
@@ -167,6 +169,115 @@ typedef struct
167169
int8_t (*PeriodicTC)(uint8_t *pbuf, uint32_t size, uint8_t cmd);
168170
int8_t (*GetState)(void);
169171
} USBD_AUDIO_ItfTypeDef;
172+
173+
/*
174+
* Audio Class specification release 1.0
175+
*/
176+
177+
/* Table 4-2: Class-Specific AC Interface Header Descriptor */
178+
typedef struct
179+
{
180+
uint8_t bLength;
181+
uint8_t bDescriptorType;
182+
uint8_t bDescriptorSubtype;
183+
uint16_t bcdADC;
184+
uint16_t wTotalLength;
185+
uint8_t bInCollection;
186+
uint8_t baInterfaceNr;
187+
} __PACKED USBD_SpeakerIfDescTypeDef;
188+
189+
/* Table 4-3: Input Terminal Descriptor */
190+
typedef struct
191+
{
192+
uint8_t bLength;
193+
uint8_t bDescriptorType;
194+
uint8_t bDescriptorSubtype;
195+
uint8_t bTerminalID;
196+
uint16_t wTerminalType;
197+
uint8_t bAssocTerminal;
198+
uint8_t bNrChannels;
199+
uint16_t wChannelConfig;
200+
uint8_t iChannelNames;
201+
uint8_t iTerminal;
202+
} __PACKED USBD_SpeakerInDescTypeDef;
203+
204+
/* USB Speaker Audio Feature Unit Descriptor */
205+
typedef struct
206+
{
207+
uint8_t bLength;
208+
uint8_t bDescriptorType;
209+
uint8_t bDescriptorSubtype;
210+
uint8_t bUnitID;
211+
uint8_t bSourceID;
212+
uint8_t bControlSize;
213+
uint16_t bmaControls;
214+
uint8_t iTerminal;
215+
} __PACKED USBD_SpeakerFeatureDescTypeDef;
216+
217+
/* Table 4-4: Output Terminal Descriptor */
218+
typedef struct
219+
{
220+
uint8_t bLength;
221+
uint8_t bDescriptorType;
222+
uint8_t bDescriptorSubtype;
223+
uint8_t bTerminalID;
224+
uint16_t wTerminalType;
225+
uint8_t bAssocTerminal;
226+
uint8_t bSourceID;
227+
uint8_t iTerminal;
228+
} __PACKED USBD_SpeakerOutDescTypeDef;
229+
230+
/* Table 4-19: Class-Specific AS Interface Descriptor */
231+
typedef struct
232+
{
233+
uint8_t bLength;
234+
uint8_t bDescriptorType;
235+
uint8_t bDescriptorSubtype;
236+
uint8_t bTerminalLink;
237+
uint8_t bDelay;
238+
uint16_t wFormatTag;
239+
} __PACKED USBD_SpeakerStreamIfDescTypeDef;
240+
241+
/* USB Speaker Audio Type III Format Interface Descriptor */
242+
typedef struct
243+
{
244+
uint8_t bLength;
245+
uint8_t bDescriptorType;
246+
uint8_t bDescriptorSubtype;
247+
uint8_t bFormatType;
248+
uint8_t bNrChannels;
249+
uint8_t bSubFrameSize;
250+
uint8_t bBitResolution;
251+
uint8_t bSamFreqType;
252+
uint8_t tSamFreq2;
253+
uint8_t tSamFreq1;
254+
uint8_t tSamFreq0;
255+
} USBD_SpeakerIIIFormatIfDescTypeDef;
256+
257+
/* Table 4-17: Standard AC Interrupt Endpoint Descriptor */
258+
typedef struct
259+
{
260+
uint8_t bLength;
261+
uint8_t bDescriptorType;
262+
uint8_t bEndpointAddress;
263+
uint8_t bmAttributes;
264+
uint16_t wMaxPacketSize;
265+
uint8_t bInterval;
266+
uint8_t bRefresh;
267+
uint8_t bSynchAddress;
268+
} __PACKED USBD_SpeakerEndDescTypeDef;
269+
270+
/* Table 4-21: Class-Specific AS Isochronous Audio Data Endpoint Descriptor */
271+
typedef struct
272+
{
273+
uint8_t bLength;
274+
uint8_t bDescriptorType;
275+
uint8_t bDescriptor;
276+
uint8_t bmAttributes;
277+
uint8_t bLockDelayUnits;
278+
uint16_t wLockDelay;
279+
} __PACKED USBD_SpeakerEndStDescTypeDef;
280+
170281
/**
171282
* @}
172283
*/
@@ -198,6 +309,11 @@ uint8_t USBD_AUDIO_RegisterInterface(USBD_HandleTypeDef *pdev,
198309
USBD_AUDIO_ItfTypeDef *fops);
199310

200311
void USBD_AUDIO_Sync(USBD_HandleTypeDef *pdev, AUDIO_OffsetTypeDef offset);
312+
313+
#ifdef USE_USBD_COMPOSITE
314+
uint32_t USBD_AUDIO_GetEpPcktSze(USBD_HandleTypeDef *pdev, uint8_t If, uint8_t Ep);
315+
#endif /* USE_USBD_COMPOSITE */
316+
201317
/**
202318
* @}
203319
*/
@@ -214,5 +330,3 @@ void USBD_AUDIO_Sync(USBD_HandleTypeDef *pdev, AUDIO_OffsetTypeDef offset);
214330
/**
215331
* @}
216332
*/
217-
218-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc/usbd_audio_if_template.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
******************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
10-
* All rights reserved.</center></h2>
9+
* Copyright (c) 2015 STMicroelectronics.
10+
* All rights reserved.
1111
*
12-
* This software component is licensed by ST under Ultimate Liberty license
13-
* SLA0044, the "License"; You may not use this file except in compliance with
14-
* the License. You may obtain a copy of the License at:
15-
* www.st.com/SLA0044
12+
* This software is licensed under terms that can be found in the LICENSE file
13+
* in the root directory of this software component.
14+
* If no LICENSE file comes with this software, it is provided AS-IS.
1615
*
1716
******************************************************************************
1817
*/
@@ -41,5 +40,3 @@ extern USBD_AUDIO_ItfTypeDef USBD_AUDIO_Template_fops;
4140
#endif
4241

4342
#endif /* __USBD_AUDIO_IF_TEMPLATE_H */
44-
45-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)