forked from stm/stm32-mw-usb-device
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edbaa3cd1d |
@@ -391,10 +391,10 @@ static uint8_t *USBD_BB_GetDeviceQualifierDesc(uint16_t *length)
|
||||
*/
|
||||
USBD_BB_DescHeader_t *USBD_BB_GetNextDesc(uint8_t *pbuf, uint16_t *ptr)
|
||||
{
|
||||
USBD_BB_DescHeader_t *pnext = (USBD_BB_DescHeader_t *)pbuf;
|
||||
USBD_BB_DescHeader_t *pnext = (USBD_BB_DescHeader_t *)(void *)pbuf;
|
||||
|
||||
*ptr += pnext->bLength;
|
||||
pnext = (USBD_BB_DescHeader_t *)(pbuf + pnext->bLength);
|
||||
pnext = (USBD_BB_DescHeader_t *)(void *)(pbuf + pnext->bLength);
|
||||
|
||||
return (pnext);
|
||||
}
|
||||
@@ -411,8 +411,8 @@ void *USBD_BB_GetCapDesc(USBD_HandleTypeDef *pdev, uint8_t *pBosDesc)
|
||||
{
|
||||
UNUSED(pdev);
|
||||
|
||||
USBD_BB_DescHeader_t *pdesc = (USBD_BB_DescHeader_t *)pBosDesc;
|
||||
USBD_BosDescTypedef *desc = (USBD_BosDescTypedef *)pBosDesc;
|
||||
USBD_BB_DescHeader_t *pdesc = (USBD_BB_DescHeader_t *)(void *)pBosDesc;
|
||||
USBD_BosDescTypedef *desc = (USBD_BosDescTypedef *)(void *)pBosDesc;
|
||||
USBD_BosBBCapDescTypedef *pCapDesc = NULL;
|
||||
uint16_t ptr;
|
||||
|
||||
@@ -426,7 +426,7 @@ void *USBD_BB_GetCapDesc(USBD_HandleTypeDef *pdev, uint8_t *pBosDesc)
|
||||
|
||||
if (pdesc->bDevCapabilityType == USBD_BILLBOARD_CAPABILITY)
|
||||
{
|
||||
pCapDesc = (USBD_BosBBCapDescTypedef *)pdesc;
|
||||
pCapDesc = (USBD_BosBBCapDescTypedef *)(void *)pdesc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -447,8 +447,8 @@ void *USBD_BB_GetAltModeDesc(USBD_HandleTypeDef *pdev, uint8_t *pBosDesc, uint8_
|
||||
{
|
||||
UNUSED(pdev);
|
||||
|
||||
USBD_BB_DescHeader_t *pdesc = (USBD_BB_DescHeader_t *)pBosDesc;
|
||||
USBD_BosDescTypedef *desc = (USBD_BosDescTypedef *)pBosDesc;
|
||||
USBD_BB_DescHeader_t *pdesc = (USBD_BB_DescHeader_t *)(void *)pBosDesc;
|
||||
USBD_BosDescTypedef *desc = (USBD_BosDescTypedef *)(void *)pBosDesc;
|
||||
USBD_BB_AltModeCapDescTypeDef *pAltModDesc = NULL;
|
||||
uint8_t cnt = 0U;
|
||||
uint16_t ptr;
|
||||
@@ -465,7 +465,7 @@ void *USBD_BB_GetAltModeDesc(USBD_HandleTypeDef *pdev, uint8_t *pBosDesc, uint8_
|
||||
{
|
||||
if (cnt == idx)
|
||||
{
|
||||
pAltModDesc = (USBD_BB_AltModeCapDescTypeDef *)pdesc;
|
||||
pAltModDesc = (USBD_BB_AltModeCapDescTypeDef *)(void *)pdesc;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -474,16 +474,16 @@ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||
(void)USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
|
||||
CDC_DATA_HS_IN_PACKET_SIZE);
|
||||
|
||||
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
|
||||
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
|
||||
|
||||
/* Open EP OUT */
|
||||
(void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
|
||||
CDC_DATA_HS_OUT_PACKET_SIZE);
|
||||
/* Open EP OUT */
|
||||
(void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
|
||||
CDC_DATA_HS_OUT_PACKET_SIZE);
|
||||
|
||||
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
|
||||
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
|
||||
|
||||
/* Set bInterval for CDC CMD Endpoint */
|
||||
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_HS_BINTERVAL;
|
||||
/* Set bInterval for CDC CMD Endpoint */
|
||||
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_HS_BINTERVAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -491,16 +491,16 @@ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||
(void)USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
|
||||
CDC_DATA_FS_IN_PACKET_SIZE);
|
||||
|
||||
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
|
||||
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
|
||||
|
||||
/* Open EP OUT */
|
||||
(void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
|
||||
CDC_DATA_FS_OUT_PACKET_SIZE);
|
||||
/* Open EP OUT */
|
||||
(void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
|
||||
CDC_DATA_FS_OUT_PACKET_SIZE);
|
||||
|
||||
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
|
||||
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
|
||||
|
||||
/* Set bInterval for CMD Endpoint */
|
||||
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_FS_BINTERVAL;
|
||||
/* Set bInterval for CMD Endpoint */
|
||||
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_FS_BINTERVAL;
|
||||
}
|
||||
|
||||
/* Open Command IN EP */
|
||||
@@ -540,7 +540,6 @@ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||
static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||
{
|
||||
UNUSED(cfgidx);
|
||||
uint8_t ret = 0U;
|
||||
|
||||
/* Close EP IN */
|
||||
(void)USBD_LL_CloseEP(pdev, CDC_IN_EP);
|
||||
@@ -563,7 +562,7 @@ static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||
pdev->pClassData = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return (uint8_t)USBD_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -583,81 +582,81 @@ static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev,
|
||||
|
||||
switch (req->bmRequest & USB_REQ_TYPE_MASK)
|
||||
{
|
||||
case USB_REQ_TYPE_CLASS:
|
||||
if (req->wLength != 0U)
|
||||
{
|
||||
if ((req->bmRequest & 0x80U) != 0U)
|
||||
case USB_REQ_TYPE_CLASS:
|
||||
if (req->wLength != 0U)
|
||||
{
|
||||
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
|
||||
(uint8_t *)hcdc->data,
|
||||
req->wLength);
|
||||
if ((req->bmRequest & 0x80U) != 0U)
|
||||
{
|
||||
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
|
||||
(uint8_t *)hcdc->data,
|
||||
req->wLength);
|
||||
|
||||
(void)USBD_CtlSendData(pdev, (uint8_t *)hcdc->data, req->wLength);
|
||||
}
|
||||
else
|
||||
{
|
||||
hcdc->CmdOpCode = req->bRequest;
|
||||
hcdc->CmdLength = (uint8_t)req->wLength;
|
||||
|
||||
(void)USBD_CtlPrepareRx(pdev, (uint8_t *)hcdc->data, req->wLength);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hcdc->CmdOpCode = req->bRequest;
|
||||
hcdc->CmdLength = (uint8_t)req->wLength;
|
||||
|
||||
(void)USBD_CtlPrepareRx(pdev, (uint8_t *)hcdc->data, req->wLength);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
|
||||
(uint8_t *)req, 0U);
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_TYPE_STANDARD:
|
||||
switch (req->bRequest)
|
||||
{
|
||||
case USB_REQ_GET_STATUS:
|
||||
if (pdev->dev_state == USBD_STATE_CONFIGURED)
|
||||
{
|
||||
(void)USBD_CtlSendData(pdev, (uint8_t *)&status_info, 2U);
|
||||
}
|
||||
else
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
|
||||
(uint8_t *)req, 0U);
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_GET_INTERFACE:
|
||||
if (pdev->dev_state == USBD_STATE_CONFIGURED)
|
||||
case USB_REQ_TYPE_STANDARD:
|
||||
switch (req->bRequest)
|
||||
{
|
||||
(void)USBD_CtlSendData(pdev, &ifalt, 1U);
|
||||
}
|
||||
else
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
}
|
||||
break;
|
||||
case USB_REQ_GET_STATUS:
|
||||
if (pdev->dev_state == USBD_STATE_CONFIGURED)
|
||||
{
|
||||
(void)USBD_CtlSendData(pdev, (uint8_t *)&status_info, 2U);
|
||||
}
|
||||
else
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_SET_INTERFACE:
|
||||
if (pdev->dev_state != USBD_STATE_CONFIGURED)
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
}
|
||||
break;
|
||||
case USB_REQ_GET_INTERFACE:
|
||||
if (pdev->dev_state == USBD_STATE_CONFIGURED)
|
||||
{
|
||||
(void)USBD_CtlSendData(pdev, &ifalt, 1U);
|
||||
}
|
||||
else
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_CLEAR_FEATURE:
|
||||
case USB_REQ_SET_INTERFACE:
|
||||
if (pdev->dev_state != USBD_STATE_CONFIGURED)
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_CLEAR_FEATURE:
|
||||
break;
|
||||
|
||||
default:
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
return (uint8_t)ret;
|
||||
@@ -694,7 +693,11 @@ static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
else
|
||||
{
|
||||
hcdc->TxState = 0U;
|
||||
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
|
||||
|
||||
if (((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt != NULL)
|
||||
{
|
||||
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
|
||||
}
|
||||
}
|
||||
|
||||
return (uint8_t)USBD_OK;
|
||||
@@ -743,7 +746,6 @@ static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev)
|
||||
(uint8_t *)hcdc->data,
|
||||
(uint16_t)hcdc->CmdLength);
|
||||
hcdc->CmdOpCode = 0xFFU;
|
||||
|
||||
}
|
||||
|
||||
return (uint8_t)USBD_OK;
|
||||
@@ -778,7 +780,7 @@ static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBD_CDC_GetCfgDesc
|
||||
* @brief USBD_CDC_GetOtherSpeedCfgDesc
|
||||
* Return configuration descriptor
|
||||
* @param speed : current device speed
|
||||
* @param length : pointer data length
|
||||
@@ -792,11 +794,11 @@ static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DeviceQualifierDescriptor
|
||||
* return Device Qualifier descriptor
|
||||
* @param length : pointer data length
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
* @brief USBD_CDC_GetDeviceQualifierDescriptor
|
||||
* return Device Qualifier descriptor
|
||||
* @param length : pointer data length
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length)
|
||||
{
|
||||
*length = (uint16_t)sizeof(USBD_CDC_DeviceQualifierDesc);
|
||||
@@ -805,7 +807,7 @@ uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBD_CDC_RegisterInterface
|
||||
* @brief USBD_CDC_RegisterInterface
|
||||
* @param pdev: device instance
|
||||
* @param fops: CD Interface callback
|
||||
* @retval status
|
||||
@@ -840,7 +842,6 @@ uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev,
|
||||
return (uint8_t)USBD_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USBD_CDC_SetRxBuffer
|
||||
* @param pdev: device instance
|
||||
@@ -889,7 +890,6 @@ uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev)
|
||||
return (uint8_t)ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USBD_CDC_ReceivePacket
|
||||
* prepare OUT Endpoint for reception
|
||||
|
||||
@@ -716,7 +716,10 @@ static uint8_t USBD_CDC_ECM_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
else
|
||||
{
|
||||
hcdc->TxState = 0U;
|
||||
((USBD_CDC_ECM_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
|
||||
if (((USBD_CDC_ECM_ItfTypeDef *)pdev->pUserData)->TransmitCplt != NULL)
|
||||
{
|
||||
((USBD_CDC_ECM_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (epnum == (CDC_ECM_CMD_EP & 0x7FU))
|
||||
@@ -1020,7 +1023,7 @@ uint8_t USBD_CDC_ECM_SendNotification(USBD_HandleTypeDef *pdev,
|
||||
(hcdc->Req).bmRequest = CDC_ECM_BMREQUEST_TYPE_ECM;
|
||||
(hcdc->Req).bRequest = (uint8_t)Notif;
|
||||
|
||||
switch (Notif)
|
||||
switch ((hcdc->Req).bRequest)
|
||||
{
|
||||
case NETWORK_CONNECTION:
|
||||
(hcdc->Req).wValue = bVal;
|
||||
|
||||
@@ -657,7 +657,7 @@ static uint8_t USBD_CDC_RNDIS_Setup(USBD_HandleTypeDef *pdev,
|
||||
USBD_SetupReqTypedef *req)
|
||||
{
|
||||
USBD_CDC_RNDIS_HandleTypeDef *hcdc = (USBD_CDC_RNDIS_HandleTypeDef *)pdev->pClassData;
|
||||
USBD_CDC_RNDIS_CtrlMsgTypeDef *Msg = (USBD_CDC_RNDIS_CtrlMsgTypeDef *)hcdc->data;
|
||||
USBD_CDC_RNDIS_CtrlMsgTypeDef *Msg = (USBD_CDC_RNDIS_CtrlMsgTypeDef *)(void *)hcdc->data;
|
||||
uint8_t ifalt = 0U;
|
||||
uint16_t status_info = 0U;
|
||||
USBD_StatusTypeDef ret = USBD_OK;
|
||||
@@ -810,7 +810,11 @@ static uint8_t USBD_CDC_RNDIS_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
else
|
||||
{
|
||||
hcdc->TxState = 0U;
|
||||
((USBD_CDC_RNDIS_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
|
||||
|
||||
if (((USBD_CDC_RNDIS_ItfTypeDef *)pdev->pUserData)->TransmitCplt != NULL)
|
||||
{
|
||||
((USBD_CDC_RNDIS_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (epnum == (CDC_RNDIS_CMD_EP & 0x7FU))
|
||||
@@ -866,7 +870,7 @@ static uint8_t USBD_CDC_RNDIS_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
NACKed till the end of the application Xfer */
|
||||
|
||||
/* Call data packet message parsing and processing function */
|
||||
(void)USBD_CDC_RNDIS_ProcessPacketMsg(pdev, (USBD_CDC_RNDIS_PacketMsgTypeDef *)hcdc->RxBuffer);
|
||||
(void)USBD_CDC_RNDIS_ProcessPacketMsg(pdev, (USBD_CDC_RNDIS_PacketMsgTypeDef *)(void *)hcdc->RxBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1071,7 +1075,7 @@ uint8_t USBD_CDC_RNDIS_TransmitPacket(USBD_HandleTypeDef *pdev)
|
||||
}
|
||||
|
||||
hcdc = (USBD_CDC_RNDIS_HandleTypeDef *)pdev->pClassData;
|
||||
PacketMsg = (USBD_CDC_RNDIS_PacketMsgTypeDef *)hcdc->TxBuffer;
|
||||
PacketMsg = (USBD_CDC_RNDIS_PacketMsgTypeDef *)(void *)hcdc->TxBuffer;
|
||||
|
||||
if (hcdc->TxState == 0U)
|
||||
{
|
||||
@@ -1192,7 +1196,7 @@ uint8_t USBD_CDC_RNDIS_SendNotification(USBD_HandleTypeDef *pdev,
|
||||
*/
|
||||
static uint8_t USBD_CDC_RNDIS_MsgParsing(USBD_HandleTypeDef *pdev, uint8_t *RxBuff)
|
||||
{
|
||||
USBD_CDC_RNDIS_CtrlMsgTypeDef *Msg = (USBD_CDC_RNDIS_CtrlMsgTypeDef *)RxBuff;
|
||||
USBD_CDC_RNDIS_CtrlMsgTypeDef *Msg = (USBD_CDC_RNDIS_CtrlMsgTypeDef *)(void *)RxBuff;
|
||||
static uint8_t ret = (uint8_t)USBD_OK;
|
||||
|
||||
/* Check message type */
|
||||
@@ -1200,37 +1204,37 @@ static uint8_t USBD_CDC_RNDIS_MsgParsing(USBD_HandleTypeDef *pdev, uint8_t *RxBu
|
||||
{
|
||||
/* CDC_RNDIS Initialize message */
|
||||
case CDC_RNDIS_INITIALIZE_MSG_ID:
|
||||
ret = USBD_CDC_RNDIS_ProcessInitMsg(pdev, (USBD_CDC_RNDIS_InitMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessInitMsg(pdev, (USBD_CDC_RNDIS_InitMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
|
||||
/* CDC_RNDIS Halt message */
|
||||
case CDC_RNDIS_HALT_MSG_ID:
|
||||
ret = USBD_CDC_RNDIS_ProcessHaltMsg(pdev, (USBD_CDC_RNDIS_HaltMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessHaltMsg(pdev, (USBD_CDC_RNDIS_HaltMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
|
||||
/* CDC_RNDIS Query message */
|
||||
case CDC_RNDIS_QUERY_MSG_ID:
|
||||
ret = USBD_CDC_RNDIS_ProcessQueryMsg(pdev, (USBD_CDC_RNDIS_QueryMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessQueryMsg(pdev, (USBD_CDC_RNDIS_QueryMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
|
||||
/* CDC_RNDIS Set message */
|
||||
case CDC_RNDIS_SET_MSG_ID:
|
||||
ret = USBD_CDC_RNDIS_ProcessSetMsg(pdev, (USBD_CDC_RNDIS_SetMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessSetMsg(pdev, (USBD_CDC_RNDIS_SetMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
|
||||
/* CDC_RNDIS Reset message */
|
||||
case CDC_RNDIS_RESET_MSG_ID:
|
||||
ret = USBD_CDC_RNDIS_ProcessResetMsg(pdev, (USBD_CDC_RNDIS_ResetMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessResetMsg(pdev, (USBD_CDC_RNDIS_ResetMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
|
||||
/* CDC_RNDIS Keep-Alive message */
|
||||
case CDC_RNDIS_KEEPALIVE_MSG_ID:
|
||||
ret = USBD_CDC_RNDIS_ProcessKeepAliveMsg(pdev, (USBD_CDC_RNDIS_KpAliveMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessKeepAliveMsg(pdev, (USBD_CDC_RNDIS_KpAliveMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
|
||||
/* CDC_RNDIS unsupported message */
|
||||
default:
|
||||
ret = USBD_CDC_RNDIS_ProcessUnsupportedMsg(pdev, (USBD_CDC_RNDIS_CtrlMsgTypeDef *)Msg);
|
||||
ret = USBD_CDC_RNDIS_ProcessUnsupportedMsg(pdev, (USBD_CDC_RNDIS_CtrlMsgTypeDef *)(void *)Msg);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1255,7 +1259,7 @@ static uint8_t USBD_CDC_RNDIS_ProcessInitMsg(USBD_HandleTypeDef *pdev,
|
||||
USBD_CDC_RNDIS_InitMsgTypeDef *InitMessage = (USBD_CDC_RNDIS_InitMsgTypeDef *)Msg;
|
||||
|
||||
/* Use same Msg input buffer as response buffer */
|
||||
USBD_CDC_RNDIS_InitCpltMsgTypeDef *InitResponse = (USBD_CDC_RNDIS_InitCpltMsgTypeDef *)Msg;
|
||||
USBD_CDC_RNDIS_InitCpltMsgTypeDef *InitResponse = (USBD_CDC_RNDIS_InitCpltMsgTypeDef *)(void *)Msg;
|
||||
|
||||
/* Store the Message Request ID */
|
||||
uint32_t ReqId = InitMessage->ReqId;
|
||||
@@ -1336,7 +1340,7 @@ static uint8_t USBD_CDC_RNDIS_ProcessKeepAliveMsg(USBD_HandleTypeDef *pdev,
|
||||
USBD_CDC_RNDIS_HandleTypeDef *hcdc = (USBD_CDC_RNDIS_HandleTypeDef *)pdev->pClassData;
|
||||
|
||||
/* Use same Msg input buffer as response buffer */
|
||||
USBD_CDC_RNDIS_KpAliveCpltMsgTypeDef *InitResponse = (USBD_CDC_RNDIS_KpAliveCpltMsgTypeDef *)Msg;
|
||||
USBD_CDC_RNDIS_KpAliveCpltMsgTypeDef *InitResponse = (USBD_CDC_RNDIS_KpAliveCpltMsgTypeDef *)(void *)Msg;
|
||||
|
||||
/* Store the Message Request ID */
|
||||
uint32_t ReqId = Msg->ReqId;
|
||||
@@ -1381,7 +1385,7 @@ static uint8_t USBD_CDC_RNDIS_ProcessQueryMsg(USBD_HandleTypeDef *pdev,
|
||||
USBD_CDC_RNDIS_HandleTypeDef *hcdc = (USBD_CDC_RNDIS_HandleTypeDef *)pdev->pClassData;
|
||||
|
||||
/* Use same Msg input buffer as response buffer */
|
||||
USBD_CDC_RNDIS_QueryCpltMsgTypeDef *QueryResponse = (USBD_CDC_RNDIS_QueryCpltMsgTypeDef *)Msg;
|
||||
USBD_CDC_RNDIS_QueryCpltMsgTypeDef *QueryResponse = (USBD_CDC_RNDIS_QueryCpltMsgTypeDef *)(void *)Msg;
|
||||
|
||||
/* Store the Message Request ID */
|
||||
uint32_t ReqId = Msg->RequestId;
|
||||
@@ -1524,7 +1528,7 @@ static uint8_t USBD_CDC_RNDIS_ProcessSetMsg(USBD_HandleTypeDef *pdev,
|
||||
USBD_CDC_RNDIS_SetMsgTypeDef *SetMessage = (USBD_CDC_RNDIS_SetMsgTypeDef *)Msg;
|
||||
|
||||
/* Use same Msg input buffer as response buffer */
|
||||
USBD_CDC_RNDIS_SetCpltMsgTypeDef *SetResponse = (USBD_CDC_RNDIS_SetCpltMsgTypeDef *)Msg;
|
||||
USBD_CDC_RNDIS_SetCpltMsgTypeDef *SetResponse = (USBD_CDC_RNDIS_SetCpltMsgTypeDef *)(void *)Msg;
|
||||
|
||||
/* Store the Message Request ID */
|
||||
uint32_t ReqId = SetMessage->ReqId;
|
||||
@@ -1578,7 +1582,7 @@ static uint8_t USBD_CDC_RNDIS_ProcessResetMsg(USBD_HandleTypeDef *pdev,
|
||||
/* Get the CDC_RNDIS handle pointer */
|
||||
USBD_CDC_RNDIS_HandleTypeDef *hcdc = (USBD_CDC_RNDIS_HandleTypeDef *)pdev->pClassData;
|
||||
/* Use same Msg input buffer as response buffer */
|
||||
USBD_CDC_RNDIS_ResetCpltMsgTypeDef *ResetResponse = (USBD_CDC_RNDIS_ResetCpltMsgTypeDef *)Msg;
|
||||
USBD_CDC_RNDIS_ResetCpltMsgTypeDef *ResetResponse = (USBD_CDC_RNDIS_ResetCpltMsgTypeDef *)(void *)Msg;
|
||||
|
||||
if ((ResetMessage->MsgLength != sizeof(USBD_CDC_RNDIS_ResetMsgTypeDef)) || \
|
||||
(ResetMessage->Reserved != 0U))
|
||||
@@ -1662,7 +1666,7 @@ static uint8_t USBD_CDC_RNDIS_ProcessUnsupportedMsg(USBD_HandleTypeDef *pdev,
|
||||
USBD_CDC_RNDIS_HandleTypeDef *hcdc = (USBD_CDC_RNDIS_HandleTypeDef *)pdev->pClassData;
|
||||
|
||||
/* Use same Msg input buffer as response buffer */
|
||||
USBD_CDC_RNDIS_StsChangeMsgTypeDef *Response = (USBD_CDC_RNDIS_StsChangeMsgTypeDef *)Msg;
|
||||
USBD_CDC_RNDIS_StsChangeMsgTypeDef *Response = (USBD_CDC_RNDIS_StsChangeMsgTypeDef *)(void *)Msg;
|
||||
|
||||
/* Setup the response buffer content */
|
||||
Response->MsgType = CDC_RNDIS_INDICATE_STATUS_MSG_ID;
|
||||
|
||||
@@ -100,16 +100,10 @@ USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev,
|
||||
return USBD_FAIL;
|
||||
}
|
||||
|
||||
/* Unlink previous class */
|
||||
if (pdev->pClass != NULL)
|
||||
{
|
||||
pdev->pClass = NULL;
|
||||
}
|
||||
|
||||
if (pdev->pConfDesc != NULL)
|
||||
{
|
||||
pdev->pConfDesc = NULL;
|
||||
}
|
||||
/* Unlink previous class resources */
|
||||
pdev->pClass = NULL;
|
||||
pdev->pUserData = NULL;
|
||||
pdev->pConfDesc = NULL;
|
||||
|
||||
/* Assign USBD Descriptors */
|
||||
if (pdesc != NULL)
|
||||
@@ -137,6 +131,9 @@ USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev)
|
||||
{
|
||||
USBD_StatusTypeDef ret;
|
||||
|
||||
/* Disconnect the USB Device */
|
||||
(void)USBD_LL_Stop(pdev);
|
||||
|
||||
/* Set Default State */
|
||||
pdev->dev_state = USBD_STATE_DEFAULT;
|
||||
|
||||
@@ -144,22 +141,15 @@ USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev)
|
||||
if (pdev->pClass != NULL)
|
||||
{
|
||||
pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
|
||||
pdev->pClass = NULL;
|
||||
pdev->pUserData = NULL;
|
||||
}
|
||||
|
||||
if (pdev->pConfDesc != NULL)
|
||||
{
|
||||
pdev->pConfDesc = NULL;
|
||||
}
|
||||
/* Free Device descriptors resources */
|
||||
pdev->pDesc = NULL;
|
||||
pdev->pConfDesc = NULL;
|
||||
|
||||
/* Stop the low level driver */
|
||||
ret = USBD_LL_Stop(pdev);
|
||||
|
||||
if (ret != USBD_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Initialize low level driver */
|
||||
/* DeInitialize low level driver */
|
||||
ret = USBD_LL_DeInit(pdev);
|
||||
|
||||
return ret;
|
||||
@@ -188,13 +178,18 @@ USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDe
|
||||
pdev->pClass = pclass;
|
||||
|
||||
/* Get Device Configuration Descriptor */
|
||||
#ifdef USE_USB_FS
|
||||
pdev->pConfDesc = (void *)pdev->pClass->GetFSConfigDescriptor(&len);
|
||||
#else /* USE_USB_HS */
|
||||
pdev->pConfDesc = (void *)pdev->pClass->GetHSConfigDescriptor(&len);
|
||||
#ifdef USE_USB_HS
|
||||
if (pdev->pClass->GetHSConfigDescriptor != NULL)
|
||||
{
|
||||
pdev->pConfDesc = (void *)pdev->pClass->GetHSConfigDescriptor(&len);
|
||||
}
|
||||
#else /* Default USE_USB_FS */
|
||||
if (pdev->pClass->GetFSConfigDescriptor != NULL)
|
||||
{
|
||||
pdev->pConfDesc = (void *)pdev->pClass->GetFSConfigDescriptor(&len);
|
||||
}
|
||||
#endif /* USE_USB_FS */
|
||||
|
||||
|
||||
return USBD_OK;
|
||||
}
|
||||
|
||||
@@ -218,23 +213,16 @@ USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev)
|
||||
*/
|
||||
USBD_StatusTypeDef USBD_Stop(USBD_HandleTypeDef *pdev)
|
||||
{
|
||||
USBD_StatusTypeDef ret;
|
||||
/* Disconnect USB Device */
|
||||
(void)USBD_LL_Stop(pdev);
|
||||
|
||||
/* Free Class Resources */
|
||||
if (pdev->pClass != NULL)
|
||||
{
|
||||
pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
|
||||
(void)pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
|
||||
}
|
||||
|
||||
if (pdev->pConfDesc != NULL)
|
||||
{
|
||||
pdev->pConfDesc = NULL;
|
||||
}
|
||||
|
||||
/* Stop the low level driver */
|
||||
ret = USBD_LL_Stop(pdev);
|
||||
|
||||
return ret;
|
||||
return USBD_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -285,7 +285,7 @@ USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef
|
||||
(void)USBD_LL_ClearStallEP(pdev, ep_addr);
|
||||
}
|
||||
(void)USBD_CtlSendStatus(pdev);
|
||||
(USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
|
||||
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -29,21 +29,6 @@ This software component is licensed by ST under Ultimate Liberty license SLA004
|
||||
|
||||
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).
|
||||
|
||||
## Compatibility information
|
||||
|
||||
This table shows the correspondence between the USB Device MW version and the corresponding HAL version of the targeted series. It is **crucial** that you use a consistent set of versions for the MW - HAL, as mentioned in this table.
|
||||
|
||||
Note that:
|
||||
* in case a series does not support a particular tag, it is not mentioned in front of it.
|
||||
* in case a series supports a recent tag, it is not mentioned in front of older ones.
|
||||
|
||||
USB Device | HAL |
|
||||
---------- | ---------- |
|
||||
Tag v2.5.1 | Tag v1.10.2 ([stm32l0xx_hal_driver](https://github.com/STMicroelectronics/stm32l0xx_hal_driver))
|
||||
Tag v2.5.2 | Tag v1.4.0 ([stm32l1xx_hal_driver](https://github.com/STMicroelectronics/stm32l1xx_hal_driver))
|
||||
Tag v2.5.3 | Tag v1.7.3 ([stm32f0xx_hal_driver](https://github.com/STMicroelectronics/stm32f0xx_hal_driver))<br>Tag v1.1.4 ([stm32f1xx_hal_driver](https://github.com/STMicroelectronics/stm32f1xx_hal_driver))<br>Tag v1.2.4 ([stm32f2xx_hal_driver](https://github.com/STMicroelectronics/stm32f2xx_hal_driver))<br>Tag v1.5.3 ([stm32f3xx_hal_driver](https://github.com/STMicroelectronics/stm32f3xx_hal_driver))
|
||||
Tag v2.6.0 | Tag v1.7.8 ([stm32f4xx_hal_driver](https://github.com/STMicroelectronics/stm32f4xx_hal_driver))<br>Tag v1.2.8 ([stm32f7xx_hal_driver](https://github.com/STMicroelectronics/stm32f7xx_hal_driver))<br>Tag v1.9.0 ([stm32h7xx_hal_driver](https://github.com/STMicroelectronics/stm32h7xx_hal_driver))<br>Tag v1.12.0 ([stm32l4xx_hal_driver](https://github.com/STMicroelectronics/stm32l4xx_hal_driver))<br>Tag v1.6.0 ([stm32wbxx_hal_driver](https://github.com/STMicroelectronics/stm32wbxx_hal_driver))
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you have any issue with the **software content** of this repository, you can file an issue [here](https://github.com/STMicroelectronics/stm32_mw_usb_device/issues/new/choose).
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<link rel="File-List" href="Release_Notes_for_STM32F2xx_StdPeriph_Driver_files/filelist.xml">
|
||||
<link rel="Edit-Time-Data" href="Release_Notes_for_STM32F2xx_StdPeriph_Driver_files/editdata.mso"><!--[if !mso]>
|
||||
@@ -891,8 +892,7 @@ ul
|
||||
</xml><![endif]--><!--[if gte mso 9]><xml>
|
||||
<o:shapelayout v:ext="edit">
|
||||
<o:idmap v:ext="edit" data="1"/>
|
||||
</o:shapelayout></xml><![endif]--><meta content="MCD Application Team" name="author"></head>
|
||||
<body style="" link="blue" vlink="blue">
|
||||
</o:shapelayout></xml><![endif]--><meta content="MCD Application Team" name="author"></head><body style="" link="blue" vlink="blue">
|
||||
|
||||
<div class="WordSection1">
|
||||
|
||||
@@ -920,10 +920,14 @@ ul
|
||||
</tbody></table>
|
||||
<p class="MsoNormal"><span style="font-family: "Arial","sans-serif"; display: none;"><o:p> </o:p></span></p>
|
||||
<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
|
||||
<tbody><tr style="">
|
||||
<tbody><tr>
|
||||
<td style="padding: 0in;" valign="top">
|
||||
<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.6.0 / 27-December-2019</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.6.1 / 05-June-2020</span></h3>
|
||||
|
||||
|
||||
|
||||
<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; color: black;"><o:p></o:p></span></u></p>
|
||||
|
||||
|
||||
@@ -946,7 +950,30 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li>Integration of three new USB device Class drivers:</li><ul><li>USB CDC ECM Class driver</li><li>USB CDC RNDIS Microsoft Class driver</li><li>USB Billboard Class driver</li></ul><li>Fix mondatory misra-c 2012 violations</li><li>update user core and class template files</li><li>USB Core:</li><ul><li>Fix unexpected EP0 stall during enumeration phase </li><li>Improve APIs error management and prevent accessing NULL pointers</li></ul><li>USB MSC Class:</li><ul><li>Fix USBCV specific class tests</li><li>Fix mutliple error with SCSI commands handling</li><li>Protect medium access when host ask for medium ejection</li></ul><li>USB CDC Class:</li><ul><li>Add new function to inform user that current IN transfer is completed</li><li>update transmit and receive APIs to transfer up to 64KB</li></ul></ul><ul style="margin-top: 0cm;" type="square"><li>USB AUDIO Class:</li><ul><li>Fix audio sync start buffer size</li><li>update user callback periodicTC args by adding pointer to user buffer and size</li></ul><li>USB CustomHID Class:</li><ul><li>Rework the OUT transfer complete and prevent automaticly re-enabling the OUT EP </li><li>Add new user API to restart the OUT transfer: USBD_CUSTOM_HID_ReceivePacket()</li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.3 / 30-April-2019</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square">
|
||||
<li>USB Core:</li>
|
||||
<ul>
|
||||
<li>minor rework on USBD_Init() USBD_DeInit()</li>
|
||||
<li>Fix warning issue with Keil due to missing return value of setup API<br>
|
||||
</li>
|
||||
</ul>
|
||||
<li>USB CDC Class:</li>
|
||||
<ul>
|
||||
<li>Fix file indentation</li>
|
||||
<li>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<br>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<br>
|
||||
<ul style="margin-top: 0cm;" type="square">
|
||||
<li>Fix minor misra-c 2012 violations</li>
|
||||
</ul>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.6.0 / 27-December-2019</span></h3>
|
||||
<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; color: black;"><o:p></o:p></span></u></p>
|
||||
|
||||
|
||||
@@ -969,7 +996,30 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li>Fix misra-c 2012 high severity violations</li><li>Core driver:</li><ul><li>protect shared macros __ALIGN_BEGIN, __ALIGN_END with C directive #ifndef</li><li>update Core driver and DFU Class driver to use USBD_SUPPORT_USER_STRING_DESC insead of USBD_SUPPORT_USER_STRING</li><li> prevent accessing to NULL pointer if the get descriptor functions are not defined</li><li>Update on USBD_LL_Resume(), restore the device state only if the current state is USBD_STATE_SUSPENDED </li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.2 / 27-Mars-2019</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
<ul style="margin-top: 0cm;" type="square"><li>Integration of three new USB device Class drivers:</li><ul><li>USB CDC ECM Class driver</li><li>USB CDC RNDIS Microsoft Class driver</li><li>USB Billboard Class driver</li></ul><li>Fix mondatory misra-c 2012 violations</li><li>update user core and class template files</li><li>USB Core:</li><ul><li>Fix unexpected EP0 stall during enumeration phase </li><li>Improve APIs error management and prevent accessing NULL pointers</li></ul><li>USB MSC Class:</li><ul><li>Fix USBCV specific class tests</li><li>Fix multiple error with SCSI commands handling</li><li>Protect medium access when host ask for medium ejection</li></ul><li>USB CDC Class:</li><ul><li>Add new function to inform user that current IN transfer is completed</li><li>update transmit and receive APIs to transfer up to 64KB</li></ul></ul><ul style="margin-top: 0cm;" type="square"><li>USB AUDIO Class:</li><ul><li>Fix audio sync start buffer size</li><li>update user callback periodicTC args by adding pointer to user buffer and size</li></ul><li>USB CustomHID Class:</li><ul><li>Rework the OUT transfer complete and prevent automatically re-enabling the OUT EP </li><li>Add new user API to restart the OUT transfer: USBD_CUSTOM_HID_ReceivePacket()</li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.3 / 30-April-2019</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; color: black;"><o:p></o:p></span></u></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li>Fix misra-c 2012 high severity violations</li><li>Core driver:</li><ul><li>protect shared macros __ALIGN_BEGIN, __ALIGN_END with C directive #ifndef</li><li>update Core driver and DFU Class driver to use USBD_SUPPORT_USER_STRING_DESC insead of USBD_SUPPORT_USER_STRING</li><li> prevent accessing to NULL pointer if the get descriptor functions are not defined</li><li>Update on USBD_LL_Resume(), restore the device state only if the current state is USBD_STATE_SUSPENDED </li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.2 / 27-Mars-2019</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; color: black;"><o:p></o:p></span></u></p>
|
||||
|
||||
|
||||
@@ -993,7 +1043,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li><span style="font-family: Verdana; font-size: 10pt;">DFU Class:</span></li><ul><li><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US"></span><span style="font-family: Verdana; font-size: 10pt;"></span>fix compilation warning due to <span style="font-size: 11pt; font-family: "Calibri",sans-serif;" lang="EN-US">unreachable
|
||||
</span> instruction code introduced with CMSIS V5.4.0 NVIC_SystemReset() prototype change</li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.1 / 03-August-2018<br>
|
||||
</span> instruction code introduced with CMSIS V5.4.0 NVIC_SystemReset() prototype change</li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.1 / 03-August-2018<br>
|
||||
</span></h3>
|
||||
|
||||
|
||||
@@ -1035,7 +1085,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">Update license section by adding path to get copy of ST Ultimate Liberty license</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Core: Fix unexpected stall during status OUT phase</span></li><li><span style="font-family: Verdana; font-size: 10pt;">DFU Class:</span></li><ul><li><span style="font-family: Verdana; font-size: 10pt;">rework hdfu struct to prevent </span><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US">unaligned </span><span style="font-family: Verdana; font-size: 10pt;"> addresses</span></li></ul><li>MSC Class:</li><ul><li>fix lba address overflow during large file transfers > 4Go</li></ul><li>Template Class:</li><ul><li>add missing Switch case Break on USBD_Template_Setup API</li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.0 / 15-December-2017<br>
|
||||
<ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">Update license section by adding path to get copy of ST Ultimate Liberty license</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Core: Fix unexpected stall during status OUT phase</span></li><li><span style="font-family: Verdana; font-size: 10pt;">DFU Class:</span></li><ul><li><span style="font-family: Verdana; font-size: 10pt;">rework hdfu struct to prevent </span><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US">unaligned </span><span style="font-family: Verdana; font-size: 10pt;"> addresses</span></li></ul><li>MSC Class:</li><ul><li>fix lba address overflow during large file transfers > 4Go</li></ul><li>Template Class:</li><ul><li>add missing Switch case Break on USBD_Template_Setup API</li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.5.0 / 15-December-2017<br>
|
||||
</span></h3>
|
||||
|
||||
|
||||
@@ -1077,7 +1127,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">Update license section</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Update</span><span style="font-size: 10pt; font-family: Verdana;"> some functions to be </span><span style="font-size: 10pt; font-family: Verdana;">MISRAC 2004</span><span style="font-size: 10pt; font-family: Verdana;"> compliant</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add HS and OtherSpeed configuration descriptor for HID and CustomHID classes</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Correct error handling in all class setup function</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add usbd_desc_template.c/ usbd_desc_template.h templates files</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add support of class and vendor request<br></span></li><li><span style="font-family: Verdana; font-size: 10pt;">CDC Class: </span><span style="font-family: Verdana; font-size: 10pt;">fix zero-length packet issue in bulk IN transfer</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Fix compilation warning with unused arguments for some functions</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Improve USB Core enumeration state machine<br></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.4.2 / 11-December-2015<br>
|
||||
<ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">Update license section</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Update</span><span style="font-size: 10pt; font-family: Verdana;"> some functions to be </span><span style="font-size: 10pt; font-family: Verdana;">MISRAC 2004</span><span style="font-size: 10pt; font-family: Verdana;"> compliant</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add HS and OtherSpeed configuration descriptor for HID and CustomHID classes</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Correct error handling in all class setup function</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add usbd_desc_template.c/ usbd_desc_template.h templates files</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add support of class and vendor request<br></span></li><li><span style="font-family: Verdana; font-size: 10pt;">CDC Class: </span><span style="font-family: Verdana; font-size: 10pt;">fix zero-length packet issue in bulk IN transfer</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Fix compilation warning with unused arguments for some functions</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Improve USB Core enumeration state machine<br></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.4.2 / 11-December-2015<br>
|
||||
</span></h3>
|
||||
|
||||
|
||||
@@ -1124,7 +1174,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.4.1 / 19-June-2015<br>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.4.1 / 19-June-2015<br>
|
||||
</span></h3>
|
||||
|
||||
|
||||
@@ -1183,7 +1233,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
|
||||
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.4.0 / 28-February-2015<br>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.4.0 / 28-February-2015<br>
|
||||
</span></h3>
|
||||
|
||||
|
||||
@@ -1233,7 +1283,7 @@ USBD_CDC_Setup() function to allow correct user implementation of
|
||||
CDC_SET_CONTROL_LINE_STATE and similar no-data setup requests.<br></span></li></ul></ul>
|
||||
</ul>
|
||||
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.3.0 / 04-November-2014<br>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.3.0 / 04-November-2014<br>
|
||||
</span></h3>
|
||||
|
||||
|
||||
@@ -1276,7 +1326,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
</ul>
|
||||
<li><span style="font-size: 10pt; font-family: Verdana;">Miscellaneous source code comments update</span></li>
|
||||
</ul>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.2.0 / 13-June-2014</span></h3>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.2.0 / 13-June-2014</span></h3>
|
||||
|
||||
|
||||
|
||||
@@ -1322,7 +1372,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
</ul>
|
||||
</ul>
|
||||
<div style="margin-left: 80px;"><span style="font-size: 10pt; font-family: Verdana;">ex. for the HID, the <span style="font-style: italic;">USBD_HID_CLASS</span> macro is defined this way </span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic;">#define USBD_HID_CLASS &USBD_HID</span></span><br> <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">and the application code can use the previous definition: <span style="font-style: italic;">&USBD_HID</span> ex. <span style="font-style: italic;">USBD_RegisterClass(&USBD_Device, &USBD_HID)</span> or the new <span style="font-style: italic;">USBD_HID_CLASS</span> ex. <span style="font-style: italic;">USBD_RegisterClass(&USBD_Device, USBD_HID_CLASS)</span></span></div>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.0 / 22-April-2014</span></h3>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.0 / 22-April-2014</span></h3>
|
||||
|
||||
|
||||
|
||||
@@ -1360,7 +1410,7 @@ Changes</span></u></b><u><span style="font-size: 10pt; font-family: Verdana; col
|
||||
|
||||
</ul>
|
||||
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 18-February-2014</span></h3>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 18-February-2014</span></h3>
|
||||
|
||||
|
||||
|
||||
@@ -1385,14 +1435,14 @@ modified vs. V1.1.0, and thus the 2 versions are not compatible.<br>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.0 / 19-March-2012<o:p></o:p></span></h3>
|
||||
<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.0 / 19-March-2012<o:p></o:p></span></h3>
|
||||
<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes<o:p></o:p></span></u></b></p>
|
||||
|
||||
<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Official support of </span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold; font-style: italic;">STM32F4xx</span> devices</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">All source files: license disclaimer text update and add link to the License file on ST Internet.<br></span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Handle test mode in the set feature request</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Handle dynamically the USB SELF POWERED feature</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Handle correctly the USBD_CtlError process to take into account error during Control OUT stage</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Miscellaneous bug fix</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 171px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0 / 22-July-2011<o:p></o:p></span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Official support of </span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold; font-style: italic;">STM32F4xx</span> devices</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">All source files: license disclaimer text update and add link to the License file on ST Internet.<br></span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Handle test mode in the set feature request</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Handle dynamically the USB SELF POWERED feature</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Handle correctly the USBD_CtlError process to take into account error during Control OUT stage</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">Miscellaneous bug fix</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 171px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0 / 22-July-2011<o:p></o:p></span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes<o:p></o:p></span></u></b></p>
|
||||
<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">First official version for <span style="font-weight: bold; font-style: italic;">STM32F105/7xx</span> and <span style="font-weight: bold; font-style: italic;">STM32F2xx</span> devices</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span><br><span style="font-size: 10pt; font-family: "Verdana","sans-serif";"></span>
|
||||
<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2><p>This
|
||||
<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2><p>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:</p><p style="text-align: center;"><a href="http://www.st.com/SLA0044" target="_blank">http://www.st.com/SLA0044</a></p><p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: "Verdana",sans-serif; color: black;"></span><span style="font-size: 12pt; font-family: "Times New Roman",serif;"><o:p></o:p></span></p>
|
||||
|
||||
Reference in New Issue
Block a user