diff --git a/cores/arduino/stm32/usb/cdc/usbd_cdc.c b/cores/arduino/stm32/usb/cdc/usbd_cdc.c
index 027189cdc9..e1c9a5085e 100644
--- a/cores/arduino/stm32/usb/cdc/usbd_cdc.c
+++ b/cores/arduino/stm32/usb/cdc/usbd_cdc.c
@@ -10,6 +10,17 @@
* - Command IN transfer (class requests management)
* - Error management
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -37,17 +48,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -41,5 +40,3 @@ extern USBD_AUDIO_ItfTypeDef USBD_AUDIO_Template_fops;
#endif
#endif /* __USBD_AUDIO_IF_TEMPLATE_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.c
index acaaf053c0..a0a094163f 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.c
@@ -4,6 +4,18 @@
* @author MCD Application Team
* @brief This file provides the Audio core functions.
*
+ *
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -38,18 +50,6 @@
*
*
* @endverbatim
- *
- ******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -197,5 +196,3 @@ static int8_t TEMPLATE_GetState(void)
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc/usbd_billboard.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc/usbd_billboard.h
index 8bff7b3550..8045140417 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc/usbd_billboard.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc/usbd_billboard.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -141,7 +140,7 @@ extern USBD_ClassTypeDef USBD_BB;
#if (USBD_CLASS_BOS_ENABLED == 1)
void *USBD_BB_GetCapDesc(USBD_HandleTypeDef *pdev, uint8_t *buf);
void *USBD_BB_GetAltModeDesc(USBD_HandleTypeDef *pdev, uint8_t *buf, uint8_t idx);
-#endif
+#endif /* (USBD_CLASS_BOS_ENABLED == 1) */
/**
* @}
@@ -159,5 +158,3 @@ void *USBD_BB_GetAltModeDesc(USBD_HandleTypeDef *pdev, uint8_t *buf, uint8_t idx
/**
* @}
*/
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src/usbd_billboard.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src/usbd_billboard.c
index e0bacaa047..f86c003bd2 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src/usbd_billboard.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src/usbd_billboard.c
@@ -7,6 +7,17 @@
* - Initialization and Configuration of high and low layer
* - Enumeration as BillBoard Device
* - Error management
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -23,17 +34,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -42,4 +41,3 @@ extern USBD_CDC_ItfTypeDef USBD_CDC_Template_fops;
#endif /* __USBD_CDC_IF_TEMPLATE_H */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
index d6ed6ce316..ad8da254e0 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
@@ -10,6 +10,17 @@
* - Command IN transfer (class requests management)
* - Error management
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -37,17 +48,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -128,6 +127,8 @@ static int8_t TEMPLATE_DeInit(void)
*/
static int8_t TEMPLATE_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length)
{
+ UNUSED(length);
+
switch (cmd)
{
case CDC_SEND_ENCAPSULATED_COMMAND:
@@ -244,5 +245,3 @@ static int8_t TEMPLATE_TransmitCplt(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc/usbd_cdc_ecm.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc/usbd_cdc_ecm.h
index 1cd71fa17f..a69c4fd2e6 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc/usbd_cdc_ecm.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc/usbd_cdc_ecm.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -79,4 +78,3 @@ extern USBD_CDC_ECM_ItfTypeDef USBD_CDC_ECM_fops;
/* Exported functions ------------------------------------------------------- */
#endif /* __USBD_CDC_ECM_IF_H */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src/usbd_cdc_ecm.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src/usbd_cdc_ecm.c
index 4b34d7c937..ec63252663 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src/usbd_cdc_ecm.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src/usbd_cdc_ecm.c
@@ -13,13 +13,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -57,4 +56,3 @@ extern USBD_CDC_RNDIS_ItfTypeDef USBD_CDC_RNDIS_fops;
#endif /* __USBD_CDC_RNDIS_IF_H */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src/usbd_cdc_rndis.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src/usbd_cdc_rndis.c
index a7c2cbc7c6..f04f2c222e 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src/usbd_cdc_rndis.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src/usbd_cdc_rndis.c
@@ -10,6 +10,17 @@
* - Command IN transfer (class requests management)
* - Error management
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -37,17 +48,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -40,4 +39,3 @@ extern USBD_CUSTOM_HID_ItfTypeDef USBD_CustomHID_template_fops;
#endif /* __USBD_CUSTOMHID_IF_TEMPLATE_H */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c
index 2fbc0570ef..6add68a856 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c
@@ -4,6 +4,17 @@
* @author MCD Application Team
* @brief This file provides the CUSTOM_HID core functions.
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -24,17 +35,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -94,4 +93,3 @@ extern USBD_DFU_MediaTypeDef USBD_DFU_MEDIA_Template_fops;
/**
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src/usbd_dfu.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src/usbd_dfu.c
index fc942a76d0..58954970c3 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src/usbd_dfu.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src/usbd_dfu.c
@@ -4,6 +4,17 @@
* @author MCD Application Team
* @brief This file provides the DFU core functions.
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -34,17 +45,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -55,9 +54,13 @@ extern "C" {
#define BOT_RESET 0xFF
#define USB_MSC_CONFIG_DESC_SIZ 32
-
+#ifndef MSC_EPIN_ADDR
#define MSC_EPIN_ADDR 0x81U
+#endif /* MSC_EPIN_ADDR */
+
+#ifndef MSC_EPOUT_ADDR
#define MSC_EPOUT_ADDR 0x01U
+#endif /* MSC_EPOUT_ADDR */
/**
* @}
@@ -101,8 +104,7 @@ typedef struct
uint32_t scsi_blk_addr;
uint32_t scsi_blk_len;
-}
-USBD_MSC_BOT_HandleTypeDef;
+} USBD_MSC_BOT_HandleTypeDef;
/* Structure for MSC process */
extern USBD_ClassTypeDef USBD_MSC;
@@ -126,5 +128,3 @@ uint8_t USBD_MSC_RegisterStorage(USBD_HandleTypeDef *pdev,
/**
* @}
*/
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h
index fb99095cd8..8550a390f0 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -87,8 +86,7 @@ typedef struct
uint8_t bCBLength;
uint8_t CB[16];
uint8_t ReservedForAlign;
-}
-USBD_MSC_BOT_CBWTypeDef;
+} USBD_MSC_BOT_CBWTypeDef;
typedef struct
@@ -98,8 +96,7 @@ typedef struct
uint32_t dDataResidue;
uint8_t bStatus;
uint8_t ReservedForAlign[3];
-}
-USBD_MSC_BOT_CSWTypeDef;
+} USBD_MSC_BOT_CSWTypeDef;
/**
* @}
@@ -146,5 +143,4 @@ void MSC_BOT_CplClrFeature(USBD_HandleTypeDef *pdev,
/**
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h
index 3aacf04a4c..f946b957ad 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -101,5 +100,3 @@ extern uint8_t MSC_Mode_Sense10_data[MODE_SENSE10_LEN];
/**
* @}
*/
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h
index 9bf10a9e6b..477affbb48 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -83,7 +82,7 @@ extern "C" {
#define UNIT_ATTENTION 6U
#define DATA_PROTECT 7U
#define BLANK_CHECK 8U
-#define VENDOR_SPECIFIC 9U
+#define MSC_VENDOR_SPECIFIC 9U
#define COPY_ABORTED 10U
#define ABORTED_COMMAND 11U
#define VOLUME_OVERFLOW 13U
@@ -181,5 +180,3 @@ void SCSI_SenseCode(USBD_HandleTypeDef *pdev, uint8_t lun, uint8_t sKey,
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_storage_template.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_storage_template.h
index 9591a3ba9d..cb8b89adb2 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_storage_template.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_storage_template.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -94,4 +93,4 @@ extern USBD_StorageTypeDef USBD_MSC_Template_fops;
/**
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
+
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c
index 09a61a6d36..7f2152f38b 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c
@@ -4,6 +4,17 @@
* @author MCD Application Team
* @brief This file provides all the MSC core functions.
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -19,17 +30,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -180,4 +179,3 @@ uint8_t MSC_Mode_Sense10_data[MODE_SENSE10_LEN] =
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
index 02fdc833a3..efa85a40d4 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2021 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -114,8 +113,7 @@ typedef struct
__IO uint32_t TxState;
__IO uint32_t RxState;
-}
-USBD_PRNT_HandleTypeDef;
+} USBD_PRNT_HandleTypeDef;
@@ -161,4 +159,3 @@ uint8_t USBD_PRNT_ReceivePacket(USBD_HandleTypeDef *pdev);
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc/usbd_printer_if_template.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc/usbd_printer_if_template.h
index 7037afad58..7765eed523 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc/usbd_printer_if_template.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc/usbd_printer_if_template.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2021 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * http://www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -42,4 +41,3 @@ extern USBD_PRNT_ItfTypeDef USBD_PRNT_Template_fops;
#endif /* __USBD_PRNT_IF_TEMPLATE_H */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src/usbd_printer.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src/usbd_printer.c
index 246674f7f9..7c1a4ba830 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src/usbd_printer.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src/usbd_printer.c
@@ -10,6 +10,17 @@
* - Command OUT transfer (class requests management)
* - Error management
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2021 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -37,17 +48,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2021 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * http://www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -71,11 +70,11 @@ USBD_PRNT_ItfTypeDef USBD_PRNT_Template_fops =
{
TEMPLATE_Init,
TEMPLATE_DeInit,
- TEMPLATE_Control_req
+ TEMPLATE_Control_req,
TEMPLATE_Receive
};
-static uint8_t PRNT_DEVICE_ID[DEVICE_ID_LEN] =
+static uint8_t PRNT_DEVICE_ID[] =
{
0x00, 0x6D,
'M', 'A', 'N', 'U', 'F', 'A', 'C', 'T', 'U', 'R', 'E', 'R', ':',
@@ -128,7 +127,7 @@ static int8_t TEMPLATE_DeInit(void)
*
* @note
* This function will issue a NAK packet on any OUT packet received on
- * USB endpoint untill exiting this function. If you exit this function
+ * USB endpoint until exiting this function. If you exit this function
* before transfer is complete on PRNT interface (ie. using DMA controller)
* it will result in receiving more data while previous ones are still
* not sent.
@@ -147,16 +146,16 @@ static int8_t TEMPLATE_Receive(uint8_t *Buf, uint32_t *Len)
/**
- * @brief TEMPLATE_PRNT_Itf_Control_req
+ * @brief TEMPLATE_Control_req
* Manage the PRNT class requests
* @param req: Command code
* @param pbuf: Buffer containing command data (request parameters)
* @param length: Number of data to be sent (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
-static int8_t TEMPLATE_PRNT_Itf_Control_req(uint8_t req, uint8_t *pbuf, uint16_t *length)
+static int8_t TEMPLATE_Control_req(uint8_t req, uint8_t *pbuf, uint16_t *length)
{
- uint32_t i = 0;
+ uint32_t i = 0U;
/* Check on the setup request value */
switch (req)
@@ -169,7 +168,7 @@ static int8_t TEMPLATE_PRNT_Itf_Control_req(uint8_t req, uint8_t *pbuf, uint16_t
pbuf[i] = PRNT_DEVICE_ID[i];
i++;
}
- *length = i;
+ *length = (uint16_t)i;
break;
/* Get Printer current status */
@@ -183,25 +182,16 @@ static int8_t TEMPLATE_PRNT_Itf_Control_req(uint8_t req, uint8_t *pbuf, uint16_t
/* Printer SOFT RESET request: cleanup pending tasks */
case PRNT_SOFT_RESET:
- (void)f_close(&hSD.MyFile);
break;
default:
- /* Unkown commands are not managed */
+ /* Unknown commands are not managed */
break;
-}
+ }
-/**
-* @brief TEMPLATE_PRNT_PageEndManager, defined by user
-* Call this function frequently to check if data is received.
-* @param Buf: Buffer of data to be received
-* @param Len: Number of data received (in bytes)
-*/
-void TEMPLATE_PRNT_PageEndManager(uint8_t *Buf, uint32_t Len)
-{
- UNUSED(Buf);
- UNUSED(Len);
+ return (0);
}
+
/**
* @}
*/
@@ -214,5 +204,3 @@ void TEMPLATE_PRNT_PageEndManager(uint8_t *Buf, uint32_t Len)
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Inc/usbd_template.h b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Inc/usbd_template.h
index 8e9163bb21..be314376f6 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Inc/usbd_template.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Inc/usbd_template.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -97,5 +96,3 @@ extern USBD_ClassTypeDef USBD_TEMPLATE_ClassDriver;
/**
* @}
*/
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Src/usbd_template.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Src/usbd_template.c
index 10ced3fc05..947ae911e3 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Src/usbd_template.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/Template/Src/usbd_template.c
@@ -4,6 +4,17 @@
* @author MCD Application Team
* @brief This file provides the HID core functions.
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -22,17 +33,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -114,6 +113,25 @@ void TransferComplete_CallBack_FS(void);
*/
void HalfTransfer_CallBack_FS(void);
+
+
+#define IMG_NBR 1U
+#define IMAGE_SIZE 0x1U
+
+const uint8_t image[] = {0x00};
+const uint8_t *tImagesList[] = {image};
+uint16_t tImagesSizes[] = {IMAGE_SIZE};
+
+/* Time laps between video frames in ms.
+ Please adjust this value depending on required speed.
+ Please note that this define uses the system HAL_Delay() which uses the systick.
+ In case of changes on HAL_Delay, please ensure the values in ms correspond. */
+#ifdef USE_USB_HS
+#define USBD_VIDEO_IMAGE_LAPS 160U
+#else
+#define USBD_VIDEO_IMAGE_LAPS 80U
+#endif /* USE_USB_HS */
+
/* USER CODE BEGIN EXPORTED_FUNCTIONS */
/* USER CODE END EXPORTED_FUNCTIONS */
@@ -136,7 +154,3 @@ void HalfTransfer_CallBack_FS(void);
#endif /* USBD_VIDEO_IF_H_ */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-
-
-
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src/usbd_video.c b/system/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src/usbd_video.c
index a414ed6ff6..a2cb571d61 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src/usbd_video.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src/usbd_video.c
@@ -4,6 +4,17 @@
* @author MCD Application Team
* @brief This file provides the Video core functions.
*
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2020 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
* @verbatim
*
* ===================================================================
@@ -35,17 +46,6 @@
* @endverbatim
*
******************************************************************************
- * @attention
- *
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -100,4 +99,3 @@ void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
index 4c4de6899a..894681958b 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -44,7 +43,7 @@
#define USBD_BB_URL_STR_DESC (uint8_t *)"www.st.com"
#define USBD_BB_ALTMODE0_STR_DESC (uint8_t *)"STM32 Alternate0 Mode"
#define USBD_BB_ALTMODE1_STR_DESC (uint8_t *)"STM32 Alternate1 Mode"
-#endif
+#endif /* USBD_CLASS_USER_STRING_DESC */
#define USB_SIZ_STRING_SERIAL 0x1AU
@@ -52,7 +51,7 @@
#define USB_SIZ_BOS_DESC 0x0CU
#elif (USBD_CLASS_BOS_ENABLED == 1)
#define USB_SIZ_BOS_DESC 0x5DU
-#endif
+#endif /* USBD_LPM_ENABLED */
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
@@ -60,4 +59,3 @@ extern USBD_DescriptorsTypeDef XXX_Desc; /* Replace 'XXX_Desc' with your active
#endif /* __USBD_DESC_TEMPLATE_H*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
index c896b5ae33..15197b92ca 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -111,4 +110,4 @@ uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
/**
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
+
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_conf_template.c b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_conf_template.c
index 381988b4fe..74ff430203 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_conf_template.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_conf_template.c
@@ -8,13 +8,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -234,6 +233,22 @@ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
return 0U;
}
+#ifdef USBD_HS_TESTMODE_ENABLE
+/**
+ * @brief Set High speed Test mode.
+ * @param pdev: Device handle
+ * @param testmode: test mode
+ * @retval USBD Status
+ */
+USBD_StatusTypeDef USBD_LL_SetTestMode(USBD_HandleTypeDef *pdev, uint8_t testmode)
+{
+ UNUSED(pdev);
+ UNUSED(testmode);
+
+ return USBD_OK;
+}
+#endif /* USBD_HS_TESTMODE_ENABLE */
+
/**
* @brief Static single allocation.
* @param size: Size of allocated memory
@@ -241,6 +256,7 @@ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
*/
void *USBD_static_malloc(uint32_t size)
{
+ UNUSED(size);
static uint32_t mem[(sizeof(USBD_HID_HandleTypeDef) / 4) + 1]; /* On 32-bit boundary */
return mem;
}
@@ -252,7 +268,7 @@ void *USBD_static_malloc(uint32_t size)
*/
void USBD_static_free(void *p)
{
-
+ UNUSED(p);
}
/**
@@ -264,5 +280,4 @@ void USBD_LL_Delay(uint32_t Delay)
{
UNUSED(Delay);
}
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
index a6154ea839..3c0610a102 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -28,7 +27,7 @@
/* Private define ------------------------------------------------------------*/
#define USBD_VID 0x0483
#define USBD_PID 0xaaaa /* Replace '0xaaaa' with your device product ID */
-#define USBD_LANGID_STRING 0xbbb /* Replace '0xbbb' with your device language ID */
+#define USBD_LANGID_STRING 0xbbb /* Replace '0xbbb' with your device language ID */
#define USBD_MANUFACTURER_STRING "xxxxx" /* Add your manufacturer string */
#define USBD_PRODUCT_HS_STRING "xxxxx" /* Add your product High Speed string */
#define USBD_PRODUCT_FS_STRING "xxxxx" /* Add your product Full Speed string */
@@ -53,7 +52,7 @@ uint8_t *USBD_Class_UserStrDescriptor(USBD_SpeedTypeDef speed, uint8_t idx, uint
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
uint8_t *USBD_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-#endif
+#endif /* (USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1) */
/* Private variables ---------------------------------------------------------*/
USBD_DescriptorsTypeDef Class_Desc =
@@ -67,17 +66,17 @@ USBD_DescriptorsTypeDef Class_Desc =
USBD_Class_InterfaceStrDescriptor,
#if (USBD_CLASS_USER_STRING_DESC == 1)
USBD_CLASS_UserStrDescriptor,
-#endif
+#endif /* USB_CLASS_USER_STRING_DESC */
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
USBD_USR_BOSDescriptor,
-#endif
+#endif /* (USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1) */
};
/* USB Standard Device Descriptor */
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
-#endif
+#endif /* __ICCARM__ */
__ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
{
0x12, /* bLength */
@@ -87,7 +86,7 @@ __ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
in order to support BOS Desc */
#else
0x00, /* bcdUSB */
-#endif
+#endif /* (USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1) */
0x02,
0x00, /* bDeviceClass */
0x00, /* bDeviceSubClass */
@@ -110,7 +109,7 @@ __ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
#if (USBD_LPM_ENABLED == 1)
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
-#endif
+#endif /* __ICCARM__ */
__ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
{
0x5,
@@ -127,13 +126,13 @@ __ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
0x0,
0x0
};
-#endif
+#endif /* USBD_LPM_ENABLED */
/* USB Device Billboard BOS descriptor Template */
#if (USBD_CLASS_BOS_ENABLED == 1)
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
-#endif
+#endif /* __ICCARM__ */
__ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
{
0x05, /* bLength */
@@ -156,14 +155,16 @@ __ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
0x34, /* bLength */
0x10, /* bDescriptorType: DEVICE CAPABILITY Type */
0x0D, /* bDevCapabilityType: BILLBOARD_CAPABILITY */
- USBD_BB_URL_STRING_INDEX, /* iAddtionalInfoURL: Index of string descriptor providing a URL where the user can go to get more
- detailed information about the product and the various Alternate Modes it supports */
+ USBD_BB_URL_STRING_INDEX, /* iAddtionalInfoURL: Index of string descriptor providing a URL where the user
+ can go to get more detailed information about the product and the various
+ Alternate Modes it supports */
0x02, /* bNumberOfAlternateModes: Number of Alternate modes supported. The
maximum value that this field can be set to is MAX_NUM_ALT_MODE. */
0x00, /* bPreferredAlternateMode: Index of the preferred Alternate Mode. System
- software may use this information to provide the user with a better user experience. */
+ software may use this information to provide the user with a better
+ user experience. */
0x00, 0x00, /* VCONN Power needed by the adapter for full functionality 000b = 1W */
@@ -184,8 +185,8 @@ __ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
0x00, /* bAlternateMode[0] Index of the Alternate Mode within the SVID as
returned in response to a Discover Modes command. Example:
- 0 first Mode entry
- 1 second mode entry */
+ 0 first Mode entry
+ 1 second mode entry */
USBD_BB_ALTMODE0_STRING_INDEX, /* iAlternateModeString[0]: Index of string descriptor describing protocol.
It is optional to support this string. */
@@ -195,10 +196,10 @@ __ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
0x01, /* bAlternateMode[1] Index of the Alternate Mode within the SVID as
returned in response to a Discover Modes command. Example:
- 0 first Mode entry
- 1 second Mode entry */
+ 0 first Mode entry
+ 1 second Mode entry */
- USBD_BB_ALTMODE1_STRING_INDEX, /* iAlternateModeString[1]: Index of string descriptor describing protocol.
+ USBD_BB_ALTMODE1_STRING_INDEX, /* iAlternateModeString[1]: Index of string descriptor describing protocol.
It is optional to support this string. */
/* Alternate Mode Desc */
/* ----------- Device Capability Descriptor: BillBoard Alternate Mode Desc ---------- */
@@ -206,21 +207,23 @@ __ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
0x10, /* bDescriptorType: Device Descriptor Type */
0x0F, /* bDevCapabilityType: BILLBOARD ALTERNATE MODE CAPABILITY */
0x00, /* bIndex: Index of Alternate Mode described in the Billboard Capability Desc */
- 0x10, 0x00, 0x00, 0x00, /* dwAlternateModeVdo: contents of the Mode VDO for the alternate mode identified by bIndex */
+ 0x10, 0x00, 0x00, 0x00, /* dwAlternateModeVdo: contents of the Mode VDO for the alternate mode
+ identified by bIndex */
0x08, /* bLength */
0x10, /* bDescriptorType: Device Descriptor Type */
0x0F, /* bDevCapabilityType: BILLBOARD ALTERNATE MODE CAPABILITY */
0x01, /* bIndex: Index of Alternate Mode described in the Billboard Capability Desc */
- 0x20, 0x00, 0x00, 0x00, /* dwAlternateModeVdo: contents of the Mode VDO for the alternate mode identified by bIndex */
+ 0x20, 0x00, 0x00, 0x00, /* dwAlternateModeVdo: contents of the Mode VDO for the alternate mode
+ identified by bIndex */
};
-#endif
+#endif /* USBD_CLASS_BOS_ENABLED */
/* USB Standard Device Descriptor */
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
-#endif
+#endif /* __ICCARM__ */
__ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
{
USB_LEN_LANGID_STR_DESC,
@@ -231,7 +234,7 @@ __ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
-#endif
+#endif /* __ICCARM__ */
__ALIGN_BEGIN uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL] =
{
USB_SIZ_STRING_SERIAL,
@@ -240,7 +243,7 @@ __ALIGN_BEGIN uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL] =
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
-#endif
+#endif /* __ICCARM__ */
__ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
/* Private functions ---------------------------------------------------------*/
@@ -371,7 +374,9 @@ uint8_t *USBD_Class_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *le
*/
static void Get_SerialNum(void)
{
- uint32_t deviceserial0, deviceserial1, deviceserial2;
+ uint32_t deviceserial0;
+ uint32_t deviceserial1;
+ uint32_t deviceserial2;
deviceserial0 = *(uint32_t *)DEVICE_ID1;
deviceserial1 = *(uint32_t *)DEVICE_ID2;
@@ -400,7 +405,7 @@ uint8_t *USBD_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
*length = sizeof(USBD_BOSDesc);
return (uint8_t *)USBD_BOSDesc;
}
-#endif
+#endif /* (USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1) */
#if (USBD_CLASS_USER_STRING_DESC == 1)
@@ -417,7 +422,7 @@ uint8_t *USBD_Class_UserStrDescriptor(USBD_SpeedTypeDef speed, uint8_t idx, uint
return USBD_StrDesc;
}
-#endif
+#endif /* USBD_CLASS_USER_STRING_DESC */
/**
@@ -447,5 +452,3 @@ static void IntToUnicode(uint32_t value, uint8_t *pbuf, uint8_t len)
pbuf[2U * idx + 1] = 0U;
}
}
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
index 1e7e62d451..7c8004ad80 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
@@ -6,13 +6,12 @@
******************************************************************************
* @attention
*
- *
+ * Copyright (c) 2015 STMicroelectronics.
+ * All rights reserved.
*
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
@@ -95,7 +94,7 @@ USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
pdev->ep_in[0].rem_length = 0U;
#else
pdev->ep_in[0].rem_length = len;
-#endif
+#endif /* USBD_AVOID_PACKET_SPLIT_MPS */
/* Start the transfer */
(void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
@@ -139,7 +138,7 @@ USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
pdev->ep_out[0].rem_length = 0U;
#else
pdev->ep_out[0].rem_length = len;
-#endif
+#endif /* USBD_AVOID_PACKET_SPLIT_MPS */
/* Start the transfer */
(void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
@@ -223,4 +222,3 @@ uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
* @}
*/
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/LICENSE.md b/system/Middlewares/ST/STM32_USB_Device_Library/LICENSE.md
new file mode 100644
index 0000000000..1af5233078
--- /dev/null
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/LICENSE.md
@@ -0,0 +1,80 @@
+SLA0044 Rev5/February 2018
+
+## Software license agreement
+
+### __ULTIMATE LIBERTY SOFTWARE LICENSE AGREEMENT__
+
+BY INSTALLING, COPYING, DOWNLOADING, ACCESSING OR OTHERWISE USING THIS SOFTWARE
+OR ANY PART THEREOF (AND THE RELATED DOCUMENTATION) FROM STMICROELECTRONICS
+INTERNATIONAL N.V, SWISS BRANCH AND/OR ITS AFFILIATED COMPANIES
+(STMICROELECTRONICS), THE RECIPIENT, ON BEHALF OF HIMSELF OR HERSELF, OR ON
+BEHALF OF ANY ENTITY BY WHICH SUCH RECIPIENT IS EMPLOYED AND/OR ENGAGED AGREES
+TO BE BOUND BY THIS SOFTWARE LICENSE AGREEMENT.
+
+Under STMicroelectronics’ intellectual property rights, the redistribution,
+reproduction and use in source and binary forms of the software or any part
+thereof, with or without modification, are permitted provided that the following
+conditions are met:
+
+1. Redistribution of source code (modified or not) must retain any copyright
+notice, this list of conditions and the disclaimer set forth below as items 10
+and 11.
+
+2. Redistributions in binary form, except as embedded into microcontroller or
+microprocessor device manufactured by or for STMicroelectronics or a software
+update for such device, must reproduce any copyright notice provided with the
+binary code, this list of conditions, and the disclaimer set forth below as
+items 10 and 11, in documentation and/or other materials provided with the
+distribution.
+
+3. Neither the name of STMicroelectronics nor the names of other contributors to
+this software may be used to endorse or promote products derived from this
+software or part thereof without specific written permission.
+
+4. This software or any part thereof, including modifications and/or derivative
+works of this software, must be used and execute solely and exclusively on or in
+combination with a microcontroller or microprocessor device manufactured by or
+for STMicroelectronics.
+
+5. No use, reproduction or redistribution of this software partially or totally
+may be done in any manner that would subject this software to any Open Source
+Terms. “Open Source Terms” shall mean any open source license which requires as
+part of distribution of software that the source code of such software is
+distributed therewith or otherwise made available, or open source license that
+substantially complies with the Open Source definition specified at
+www.opensource.org and any other comparable open source license such as for
+example GNU General Public License (GPL), Eclipse Public License (EPL), Apache
+Software License, BSD license or MIT license.
+
+6. STMicroelectronics has no obligation to provide any maintenance, support or
+updates for the software.
+
+7. The software is and will remain the exclusive property of STMicroelectronics
+and its licensors. The recipient will not take any action that jeopardizes
+STMicroelectronics and its licensors' proprietary rights or acquire any rights
+in the software, except the limited rights specified hereunder.
+
+8. The recipient shall comply with all applicable laws and regulations affecting
+the use of the software or any part thereof including any applicable export
+control law or regulation.
+
+9. Redistribution and use of this software or any part thereof other than as
+permitted under this license is void and will automatically terminate your
+rights under this license.
+
+10. THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, WHICH ARE
+DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL
+STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+11. EXCEPT AS EXPRESSLY PERMITTED HEREUNDER, NO LICENSE OR OTHER RIGHTS, WHETHER
+EXPRESS OR IMPLIED, ARE GRANTED UNDER ANY PATENT OR OTHER INTELLECTUAL PROPERTY
+RIGHTS OF STMICROELECTRONICS OR ANY THIRD PARTY.
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/README.md b/system/Middlewares/ST/STM32_USB_Device_Library/README.md
new file mode 100644
index 0000000000..c25a919135
--- /dev/null
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/README.md
@@ -0,0 +1,36 @@
+# Middleware USB Device MCU Component
+
+
+
+## Overview
+
+**STM32Cube** is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.
+
+**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.
+ * The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
+ * The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
+ * The BSP drivers of each evaluation, demonstration or nucleo board provided for this STM32 series.
+ * A consistent set of middleware libraries such as RTOS, USB, FatFS, graphics, touch sensing library...
+ * A full set of software projects (basic examples, applications, and demonstrations) for each board provided for this STM32 series.
+
+Two models of publication are proposed for the STM32Cube embedded software:
+ * The monolithic **MCU Package**: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name **STM32Cubexx**, xx corresponding to the STM32 series).
+ * The **MCU component**: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.
+
+## Description
+
+This **stm32_mw_usb_device** MCU component repository is one element **common to all** STM32Cube MCU embedded software packages, providing the **USB Device MCU Middleware** part.
+
+It represents ST offer to ensure the support of USB Devices on STM32 MCUs.
+It includes two main modules:
+ * **Core** module for the USB device standard peripheral control APIs. It includes the files ensuring USB 2.0 standard code implementation for an USB device.
+These files’ APIs will be called within every USB device application regardless of the desired functionality.
+ * **Class** module for the commonly supported classes APIs. it includes the files including different USB device classes. All STM32 USB classes are implemented according to the USB 2.0 and every class’s specifications. These files’ APIs will be called within USB device applications according to the desired functionality.
+
+## Release note
+
+Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/stm32_mw_usb_device/blob/master/Release_Notes.html).
+
+## Troubleshooting
+
+Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
\ No newline at end of file
diff --git a/system/Middlewares/ST/STM32_USB_Device_Library/Release_Notes.html b/system/Middlewares/ST/STM32_USB_Device_Library/Release_Notes.html
index cf3544b244..9744d73f72 100644
--- a/system/Middlewares/ST/STM32_USB_Device_Library/Release_Notes.html
+++ b/system/Middlewares/ST/STM32_USB_Device_Library/Release_Notes.html
@@ -1,1517 +1,1020 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Release Notes for STM32 USB Device Library
-
-
-
-
-
-
-
-
-
-
Fix some compilation warnings related
+to unused parameters
+
+
+
Improve some code parts style
+
+
+
Add check on the USB Device status in
+USBD_LL_Suspend before suspending it
+
+
+
USB CDC-ACM Class:
+
+
+
Remove redundant prototype declaration of
+USBD_CDC_GetOtherSpeedCfgDesc()
+
+
+
USB CompositeBuilder, CCID, CDC_ECM, CDC_RNDIS,
+CustomHID, MSC & Video Classes:
+
+
+
Improve some code parts style
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
USB VIDEO Class:
+
+
+
Correction of the support of
+VS_PROBE_CONTROL & VS_COMMIT_CONTROL requets
+
+
+
USB AUDIO Class:
+
+
+
Correction of the check on
+AUDIO_TOTAL_BUF_SIZE to avoid vulnerabilities
+
+
+
USB HID Class:
+
+
+
Modification of some constants names to
+avoid duplication versus USB host library
+
+
+
USB CustomHID Class:
+
+
+
Add support of Get Report control
+request
+
+
+
Allow disabling EP OUT prepare receive
+using a dedicated macros that can be defined in usbd_conf.h application
+file
+
+
+
Add support of Report Descriptor with
+length greater than 255 bytes
+
+
+
USB CCID Class:
+
+
+
Fix minor Code Spelling warning
+
+
+
USB All Classes:
+
+
+
Update all classes to support composite
+multi-instance using the class id parameter
+
+
+
Fix code spelling and improve code
+style
+
+
+
fix misraC 2012 rule 10.3
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Integration of new USB device
+Class driver:
+
+
+
Adding support of Composite devices with
+an auto generation of composite device configuration descriptors
+
+
+
USB All Classes:
+
+
+
Fix Code Spelling and improve Code
+Style
+
+
+
Update device class drivers to support
+Composite devices
+
+
+
Improve declaration of USB configuration
+descriptor table which is allocated if the composite builder is not
+selected
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Integration of new USB device
+Class driver:
+
+
+
USB CCID Class driver based on Universal
+Serial Bus Device Class Definition for Integrated Circuit(s) Cards
+Interface Devices Revision 1.1
+
+
+
USB MTP Class driver based on Universal
+Serial Bus Device Class Media Transfer Protocol Revision 1.1
+
+
+
USB All Classes:
+
+
+
Fix Code Spelling and improve Code
+Style
+
+
+
Update the way to declare licenses
+
+
+
USB CDC/RNDIS/ECM
+Classes:
+
+
+
Fix compilation warning with C++ due to
+missing casting during class handler allocation
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Integration of new USB device
+Class driver:
+
+
+
USB Printer Class driver based on
+Universal Serial Bus Device Class Definition for Printing Devices
+Version 1.1
+
+
+
USB All Classes:
+
+
+
Fix USB buffer overflow vulnerability for
+CDC, CDC-ECM, CDC-RNDIS, DFU, AUDIO, CustomHID, and Video Classes
+
+
+
Fix compilation warning with C++ due to
+missing casting during class handler allocation
+
+
+
Enhance comments of USB configuration
+descriptors fields
+
+
+
USB Video Class:
+
+
+
Fix missing closing bracket for extern “C”
+in usbd_video.h
+
+
+
Fix USBCV test with Uncompressed video
+format support
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
USB All Class: Add NULL pointer access
+check to Class handler
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Integration of new USB device
+Class driver:
+
+
+
USB video Class driver based on USB-IF
+video class definition version 1.1
+
+
+
USB Core:
+
+
+
Enhance NULL pointer check in Core
+APIs
+
+
+
Allow supporting both USER and USER Class
+string desc
+
+
+
Add support of USB controller which
+handles packet-size splitting by hardware
+
+
+
Avoid compilation warning due macro
+redefinition
+
+
+
change added to USBD_HandleTypeDef
+structure: dev_state, old_dev_state and ep0_state declaration become
+volatile to disable compiler optimization
+
+
+
Word spelling correction and file
+indentation improved
+
+
+
usbd_conf.h/c Template file updated to
+suggest using by default a static memory allocation for Class
+handler
+
+
+
USB All Classes:
+
+
+
Word spelling correction and file
+indentation improved
+
+
+
Allow updating device config descriptor
+Max power from user code usbd_conf.h using USBD_MAX_POWER define
+
+
+
Fix device config descriptor bmAttributes
+value which depends on user code define USBD_SELF_POWERED
+
+
+
USB CDC Class:
+
+
+
Class specific request, add protection to
+limit the maximum data length to be sent by the CDC device
+
+
+
USB CustomHID Class:
+
+
+
Allow changing CustomHID data EP size from
+user code
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Fix minor misra-c 2012 violations
+
+
+
USB Core:
+
+
+
minor rework on USBD_Init()
+USBD_DeInit()
+
+
+
Fix warning issue with Keil due to missing
+return value of setup API
+
+
+
USB CDC Class:
+
+
+
Fix file indentation
+
+
+
Avoid accessing to NULL pointer in case
TransmitCplt() user fops is not defined to allow application
-compatibility with device library version below v2.6.0
-
-
-
-
-
-
Fix minor misra-c 2012 violations
-
-
V2.6.0 / 27-December-2019
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Integration of three new USB device Class drivers:
USB CDC ECM Class driver
USB CDC RNDIS Microsoft Class driver
USB Billboard Class driver
Fix mandatory misra-c 2012 violations
update user core and class template files
USB Core:
Fix unexpected EP0 stall during enumeration phase
Improve APIs error management and prevent accessing NULL pointers
USB MSC Class:
Fix USBCV specific class tests
Fix multiple error with SCSI commands handling
Protect medium access when host ask for medium ejection
USB CDC Class:
Add new function to inform user that current IN transfer is completed
update transmit and receive APIs to transfer up to 64KB
USB AUDIO Class:
Fix audio sync start buffer size
update user callback periodicTC args by adding pointer to user buffer and size
USB CustomHID Class:
Rework the OUT transfer complete and prevent automatically re-enabling the OUT EP
Add new user API to restart the OUT transfer: USBD_CUSTOM_HID_ReceivePacket()
V2.5.3 / 30-April-2019
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Fix misra-c 2012 high severity violations
Core driver:
protect shared macros __ALIGN_BEGIN, __ALIGN_END with C directive #ifndef
update Core driver and DFU Class driver to use USBD_SUPPORT_USER_STRING_DESC instead of USBD_SUPPORT_USER_STRING
prevent accessing to NULL pointer if the get descriptor functions are not defined
Update on USBD_LL_Resume(), restore the device state only if the current state is USBD_STATE_SUSPENDED
V2.5.2 / 27-Mars-2019
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DFU Class:
fix compilation warning due to unreachable
- instruction code introduced with CMSIS V5.4.0 NVIC_SystemReset() prototype change
V2.5.1 / 03-August-2018
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Update license section by adding path to get copy of ST Ultimate Liberty license
Core: Fix unexpected stall during status OUT phase
DFU Class:
rework hdfu struct to prevent unaligned addresses
MSC Class:
fix lba address overflow during large file transfers > 4Go
Template Class:
add missing Switch case Break on USBD_Template_Setup API
V2.5.0 / 15-December-2017
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Update license section
Update some functions to be MISRAC 2004 compliant
Add HS and OtherSpeed configuration descriptor for HID and CustomHID classes
Correct error handling in all class setup function
CDC Class: fix zero-length packet issue in bulk IN transfer
Fix compilation warning with unused arguments for some functions
Improve USB Core enumeration state machine
V2.4.2 / 11-December-2015
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
CDC Class
usbd_cdc.c: change #include "USBD_CDC.h" by #include "usbd_cdc.h"
-
-
-
-
V2.4.1 / 19-June-2015
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
CDC Class
-
-
usbd_cdc.c: comments update
-
-
MSC Class
-
-
usbd_msc_bot.h: update to be C++ compliant
-
-
AUDIO Class
-
-
usbd_audio.c: fix issue when Host sends GetInterface command it gets a wrong value
-
-
-
usbd_audio.c: remove useless management of DMA half transfer
-
-
-
-
-
-
-
V2.4.0 / 28-February-2015
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Core Driver
-
-
Add support of Link Power Management (LPM): add new API GetBOSDescriptor(), that is used only if USBD_LPM_ENABLED switch is enabled in usbd_conf.h file
usbd_core.c:
-Fix bug of unsupported premature Host Out stage during data In stage
-(ie. when endpoint 0 maximum data size is 8 and Host requests
-GetDeviceDescriptor for the first time)
usbd_ctlreq.c: Fix bug of unsupported Endpoint Class requests (ie. Audio SetCurrent request for endpoint sampling rate setting)
-
-
HID Class
-
-
Updating Polling time API USBD_HID_GetPollingInterval() to query this period for HS and FS
usbd_hid.c: Fix USBD_LL_CloseEP() function call in USBD_HID_DeInit() replacing endpoint size by endpoint address.
-
CDC Class
usbd_cdc.c:
Add missing GetInterface request management in USBD_CDC_Setup() function
Update
-USBD_CDC_Setup() function to allow correct user implementation of
-CDC_SET_CONTROL_LINE_STATE and similar no-data setup requests.
-
-
-
V2.3.0 / 04-November-2014
-
-
-
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Update all drivers to be C++ compliant
-
-
CDC Class
-
-
usbd_cdc.c: fix clear flag issue in USBD_CDC_TransmitPacket() function
-
-
-
usbd_cdc_if_template.c: update TEMPLATE_Receive() function header comment
-
-
-
Miscellaneous source code comments update
-
-
V2.2.0 / 13-June-2014
-
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source code comments review and update
-
HID class
-
-
Remove unused API USBD_HID_DeviceQualifierDescriptor()
-
Add a new API in the HID class to query the poll time USBD_HID_GetPollingInterval()
-
Add alias for the class definition, it's defined as macro with capital letter
-
-
-
ex. for the HID, the USBD_HID_CLASS macro is defined this way #define USBD_HID_CLASS &USBD_HID and the application code can use the previous definition: &USBD_HID ex. USBD_RegisterClass(&USBD_Device, &USBD_HID) or the new USBD_HID_CLASS ex. USBD_RegisterClass(&USBD_Device, USBD_HID_CLASS)
-
V2.1.0 / 22-April-2014
-
-
-
-
-
-
-
-
-
Main
-Changes
-
-
-
-
-
-
-
-
-
-
-
-
-
usbd_conf_template.c: update file with the right content (it was using MSC memory management layer)
-
-
usbd_conf_template.h: change include of stm32f4xx.h by stm32xxx.h and add comment to inform user to adapt it to the device used
-
Several enhancements in CustomHID class
-
-
Update the Custom HID class driver to simplify the link with user processes
-
Optimize the Custom HID class driver and reduce footprint
-
Add USBD_CUSTOM_HID_RegisterInterface() API to link user process to custom HID class
Major update
-based on STM32Cube specification: Library Core, Classes architecture and APIs
-modified vs. V1.1.0, and thus the 2 versions are not compatible.
-
This version has to be used only with STM32Cube based development
-
-
-
-
V1.1.0 / 19-March-2012
-
Main
-Changes
-
-
Official support of STM32F4xx devices
All source files: license disclaimer text update and add link to the License file on ST Internet.
Handle test mode in the set feature request
Handle dynamically the USB SELF POWERED feature
Handle correctly the USBD_CtlError process to take into account error during Control OUT stage
Miscellaneous bug fix
V1.0.0 / 22-July-2011
Main
-Changes
-
First official version for STM32F105/7xx and STM32F2xx devices
-
License
This
-software component is licensed by ST under Ultimate Liberty license
-SLA0044, the "License"; You may not use this component except in
-compliance with the License. You may obtain a copy of the License at:
usbd_audio.c: fix issue when Host sends
+GetInterface command it gets a wrong value
+
+
+
usbd_audio.c: remove useless management of
+DMA half transfer
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Core Driver
+
+
+
Add support of Link Power Management
+(LPM): add new API GetBOSDescriptor(), that is used only if
+USBD_LPM_ENABLED switch is enabled in usbd_conf.h file
+
+
+
usbd_core.c: Fix bug of unsupported
+premature Host Out stage during data In stage (ie. when endpoint 0
+maximum data size is 8 and Host requests GetDeviceDescriptor for the
+first time)
+
+
+
usbd_ctlreq.c: Fix bug of unsupported
+Endpoint Class requests (ie. Audio SetCurrent request for endpoint
+sampling rate setting)
+
+
+
HID Class
+
+
+
Updating Polling time API
+USBD_HID_GetPollingInterval() to query this period for HS and FS
+
+
+
usbd_hid.c: Fix USBD_LL_CloseEP() function
+call in USBD_HID_DeInit() replacing endpoint size by endpoint
+address.
+
+
+
CDC Class
+
+
+
usbd_cdc.c: Add missing GetInterface
+request management in USBD_CDC_Setup() function
+
+
+
usbd_cdc.c: Update USBD_CDC_Setup()
+function to allow correct user implementation of
+CDC_SET_CONTROL_LINE_STATE and similar no-data setup requests.
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Update all drivers to be C++
+compliant
+
+
+
CDC Class
+
+
+
usbd_cdc.c: fix clear flag issue in
+USBD_CDC_TransmitPacket() function
+
+
+
usbd_cdc_if_template.c: update
+TEMPLATE_Receive() function header comment
+
+
+
Miscellaneous source code comments
+update
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
Source code comments review and
+update
+
+
+
HID class
+
+
+
Remove unused API
+USBD_HID_DeviceQualifierDescriptor()
+
+
+
Add a new API in the HID class to query
+the poll time USBD_HID_GetPollingInterval()
Add alias for the class definition, it’s
+defined as macro with capital letter
+
+
+
ex. for the HID, the USBD_HID_CLASS macro
+is defined this way #define USBD_HID_CLASS &USBD_HID
+
+
+
and the application code can use the
+previous definition: &USBD_HID ex.
+USBD_RegisterClass(&USBD_Device, &USBD_HID) or the new
+USBD_HID_CLASS ex. USBD_RegisterClass(&USBD_Device,
+USBD_HID_CLASS)
+
+
+
+
+
+
+
+
Main Changes
+
+
+
+
Headline
+
+
+
+
+
usbd_conf_template.c: update file with the
+right content (it was using MSC memory management layer)
+
+
+
usbd_conf_template.h: change include of
+stm32f4xx.h by stm32xxx.h and add comment to inform user to adapt it to
+the device used
+
+
+
Several enhancements in CustomHID
+class
+
+
+
Update the Custom HID class driver to
+simplify the link with user processes
+
+
+
Optimize the Custom HID class driver and
+reduce footprint
+
+
+
Add USBD_CUSTOM_HID_RegisterInterface()
+API to link user process to custom HID class