mirror of
https://github.com/STMicroelectronics/stm32-mw-usb-device.git
synced 2026-02-09 04:25:36 -05:00
Release v2.5.3
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
* 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
|
||||
* www.st.com/SLA0044
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
@@ -83,32 +83,32 @@
|
||||
*/
|
||||
|
||||
|
||||
static uint8_t USBD_TEMPLATE_Init (USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx);
|
||||
static uint8_t USBD_TEMPLATE_Init(USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_DeInit (USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx);
|
||||
static uint8_t USBD_TEMPLATE_DeInit(USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_Setup (USBD_HandleTypeDef *pdev,
|
||||
USBD_SetupReqTypedef *req);
|
||||
static uint8_t USBD_TEMPLATE_Setup(USBD_HandleTypeDef *pdev,
|
||||
USBD_SetupReqTypedef *req);
|
||||
|
||||
static uint8_t *USBD_TEMPLATE_GetCfgDesc (uint16_t *length);
|
||||
static uint8_t *USBD_TEMPLATE_GetCfgDesc(uint16_t *length);
|
||||
|
||||
static uint8_t *USBD_TEMPLATE_GetDeviceQualifierDesc (uint16_t *length);
|
||||
static uint8_t *USBD_TEMPLATE_GetDeviceQualifierDesc(uint16_t *length);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_DataIn (USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
static uint8_t USBD_TEMPLATE_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_DataOut (USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
static uint8_t USBD_TEMPLATE_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_EP0_RxReady (USBD_HandleTypeDef *pdev);
|
||||
static uint8_t USBD_TEMPLATE_EP0_RxReady(USBD_HandleTypeDef *pdev);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_EP0_TxReady (USBD_HandleTypeDef *pdev);
|
||||
static uint8_t USBD_TEMPLATE_EP0_TxReady(USBD_HandleTypeDef *pdev);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_SOF (USBD_HandleTypeDef *pdev);
|
||||
static uint8_t USBD_TEMPLATE_SOF(USBD_HandleTypeDef *pdev);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_IsoINIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
static uint8_t USBD_TEMPLATE_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
|
||||
static uint8_t USBD_TEMPLATE_IsoOutIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
static uint8_t USBD_TEMPLATE_IsoOutIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum);
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -137,7 +137,7 @@ USBD_ClassTypeDef USBD_TEMPLATE_ClassDriver =
|
||||
};
|
||||
|
||||
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
|
||||
#pragma data_alignment=4
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
/* USB TEMPLATE device Configuration Descriptor */
|
||||
static uint8_t USBD_TEMPLATE_CfgDesc[USB_TEMPLATE_CONFIG_DESC_SIZ] =
|
||||
@@ -159,7 +159,7 @@ static uint8_t USBD_TEMPLATE_CfgDesc[USB_TEMPLATE_CONFIG_DESC_SIZ] =
|
||||
};
|
||||
|
||||
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
|
||||
#pragma data_alignment=4
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
/* USB Standard Device Descriptor */
|
||||
static uint8_t USBD_TEMPLATE_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC] =
|
||||
@@ -191,8 +191,8 @@ static uint8_t USBD_TEMPLATE_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC] =
|
||||
* @param cfgidx: Configuration index
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_Init (USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx)
|
||||
static uint8_t USBD_TEMPLATE_Init(USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@@ -207,8 +207,8 @@ static uint8_t USBD_TEMPLATE_Init (USBD_HandleTypeDef *pdev,
|
||||
* @param cfgidx: Configuration index
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_DeInit (USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx)
|
||||
static uint8_t USBD_TEMPLATE_DeInit(USBD_HandleTypeDef *pdev,
|
||||
uint8_t cfgidx)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -221,37 +221,37 @@ static uint8_t USBD_TEMPLATE_DeInit (USBD_HandleTypeDef *pdev,
|
||||
* @param req: usb requests
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_Setup (USBD_HandleTypeDef *pdev,
|
||||
USBD_SetupReqTypedef *req)
|
||||
static uint8_t USBD_TEMPLATE_Setup(USBD_HandleTypeDef *pdev,
|
||||
USBD_SetupReqTypedef *req)
|
||||
{
|
||||
USBD_StatusTypeDef ret = USBD_OK;
|
||||
|
||||
switch (req->bmRequest & USB_REQ_TYPE_MASK)
|
||||
{
|
||||
case USB_REQ_TYPE_CLASS :
|
||||
switch (req->bRequest)
|
||||
{
|
||||
case USB_REQ_TYPE_CLASS :
|
||||
switch (req->bRequest)
|
||||
{
|
||||
default:
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_TYPE_STANDARD:
|
||||
switch (req->bRequest)
|
||||
{
|
||||
default:
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
USBD_CtlError (pdev, req);
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_TYPE_STANDARD:
|
||||
switch (req->bRequest)
|
||||
{
|
||||
default:
|
||||
USBD_CtlError (pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
USBD_CtlError (pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -264,9 +264,9 @@ static uint8_t USBD_TEMPLATE_Setup (USBD_HandleTypeDef *pdev,
|
||||
* @param length : pointer data length
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
static uint8_t *USBD_TEMPLATE_GetCfgDesc (uint16_t *length)
|
||||
static uint8_t *USBD_TEMPLATE_GetCfgDesc(uint16_t *length)
|
||||
{
|
||||
*length = sizeof (USBD_TEMPLATE_CfgDesc);
|
||||
*length = sizeof(USBD_TEMPLATE_CfgDesc);
|
||||
return USBD_TEMPLATE_CfgDesc;
|
||||
}
|
||||
|
||||
@@ -276,9 +276,9 @@ static uint8_t *USBD_TEMPLATE_GetCfgDesc (uint16_t *length)
|
||||
* @param length : pointer data length
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
uint8_t *USBD_TEMPLATE_DeviceQualifierDescriptor (uint16_t *length)
|
||||
uint8_t *USBD_TEMPLATE_DeviceQualifierDescriptor(uint16_t *length)
|
||||
{
|
||||
*length = sizeof (USBD_TEMPLATE_DeviceQualifierDesc);
|
||||
*length = sizeof(USBD_TEMPLATE_DeviceQualifierDesc);
|
||||
return USBD_TEMPLATE_DeviceQualifierDesc;
|
||||
}
|
||||
|
||||
@@ -290,8 +290,8 @@ uint8_t *USBD_TEMPLATE_DeviceQualifierDescriptor (uint16_t *length)
|
||||
* @param epnum: endpoint index
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_DataIn (USBD_HandleTypeDef *pdev,
|
||||
uint8_t epnum)
|
||||
static uint8_t USBD_TEMPLATE_DataIn(USBD_HandleTypeDef *pdev,
|
||||
uint8_t epnum)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -303,7 +303,7 @@ static uint8_t USBD_TEMPLATE_DataIn (USBD_HandleTypeDef *pdev,
|
||||
* @param pdev: device instance
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_EP0_RxReady (USBD_HandleTypeDef *pdev)
|
||||
static uint8_t USBD_TEMPLATE_EP0_RxReady(USBD_HandleTypeDef *pdev)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -314,7 +314,7 @@ static uint8_t USBD_TEMPLATE_EP0_RxReady (USBD_HandleTypeDef *pdev)
|
||||
* @param pdev: device instance
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_EP0_TxReady (USBD_HandleTypeDef *pdev)
|
||||
static uint8_t USBD_TEMPLATE_EP0_TxReady(USBD_HandleTypeDef *pdev)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -325,7 +325,7 @@ static uint8_t USBD_TEMPLATE_EP0_TxReady (USBD_HandleTypeDef *pdev)
|
||||
* @param pdev: device instance
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_SOF (USBD_HandleTypeDef *pdev)
|
||||
static uint8_t USBD_TEMPLATE_SOF(USBD_HandleTypeDef *pdev)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -337,7 +337,7 @@ static uint8_t USBD_TEMPLATE_SOF (USBD_HandleTypeDef *pdev)
|
||||
* @param epnum: endpoint index
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_IsoINIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
static uint8_t USBD_TEMPLATE_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -349,7 +349,7 @@ static uint8_t USBD_TEMPLATE_IsoINIncomplete (USBD_HandleTypeDef *pdev, uint8_t
|
||||
* @param epnum: endpoint index
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_IsoOutIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
static uint8_t USBD_TEMPLATE_IsoOutIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -361,8 +361,8 @@ static uint8_t USBD_TEMPLATE_IsoOutIncomplete (USBD_HandleTypeDef *pdev, uint8_
|
||||
* @param epnum: endpoint index
|
||||
* @retval status
|
||||
*/
|
||||
static uint8_t USBD_TEMPLATE_DataOut (USBD_HandleTypeDef *pdev,
|
||||
uint8_t epnum)
|
||||
static uint8_t USBD_TEMPLATE_DataOut(USBD_HandleTypeDef *pdev,
|
||||
uint8_t epnum)
|
||||
{
|
||||
|
||||
return USBD_OK;
|
||||
@@ -374,9 +374,9 @@ static uint8_t USBD_TEMPLATE_DataOut (USBD_HandleTypeDef *pdev,
|
||||
* @param length : pointer data length
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
uint8_t *USBD_TEMPLATE_GetDeviceQualifierDesc (uint16_t *length)
|
||||
uint8_t *USBD_TEMPLATE_GetDeviceQualifierDesc(uint16_t *length)
|
||||
{
|
||||
*length = sizeof (USBD_TEMPLATE_DeviceQualifierDesc);
|
||||
*length = sizeof(USBD_TEMPLATE_DeviceQualifierDesc);
|
||||
return USBD_TEMPLATE_DeviceQualifierDesc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user