mirror of
https://github.com/STMicroelectronics/stm32-mw-usb-device.git
synced 2026-02-08 12:08:06 -05:00
Release v2.11.0
This commit is contained in:
@@ -76,6 +76,11 @@ extern "C" {
|
||||
#define USBD_CUSTOMHID_OUTREPORT_BUF_SIZE 0x02U
|
||||
#define USBD_CUSTOM_HID_REPORT_DESC_SIZE 163U
|
||||
|
||||
/* #define USBD_CUSTOMHID_CTRL_REQ_GET_REPORT_ENABLED */
|
||||
/* #define USBD_CUSTOMHID_OUT_PREPARE_RECEIVE_DISABLED */
|
||||
/* #define USBD_CUSTOMHID_EP0_OUT_PREPARE_RECEIVE_DISABLED */
|
||||
/* #define USBD_CUSTOMHID_CTRL_REQ_COMPLETE_CALLBACK_ENABLED */
|
||||
|
||||
/* VIDEO Class Config */
|
||||
#define UVC_1_1 /* #define UVC_1_0 */
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ USBD_StatusTypeDef USBD_RegisterClassComposite(USBD_HandleTypeDef *pdev, USBD_C
|
||||
USBD_CompositeClassTypeDef classtype, uint8_t *EpAddr);
|
||||
|
||||
USBD_StatusTypeDef USBD_UnRegisterClassComposite(USBD_HandleTypeDef *pdev);
|
||||
uint8_t USBD_CoreGetEPAdd(USBD_HandleTypeDef *pdev, uint8_t ep_dir, uint8_t ep_type);
|
||||
uint8_t USBD_CoreGetEPAdd(USBD_HandleTypeDef *pdev, uint8_t ep_dir, uint8_t ep_type, uint8_t ClassId);
|
||||
#endif /* USE_USBD_COMPOSITE */
|
||||
|
||||
uint8_t USBD_CoreFindIF(USBD_HandleTypeDef *pdev, uint8_t index);
|
||||
|
||||
@@ -1123,20 +1123,21 @@ uint8_t USBD_CoreFindEP(USBD_HandleTypeDef *pdev, uint8_t index)
|
||||
* @param pdev: device instance
|
||||
* @param ep_dir: USBD_EP_IN or USBD_EP_OUT
|
||||
* @param ep_type: USBD_EP_TYPE_CTRL, USBD_EP_TYPE_ISOC, USBD_EP_TYPE_BULK or USBD_EP_TYPE_INTR
|
||||
* @param ClassId: The Class ID
|
||||
* @retval Address of the selected endpoint or 0xFFU if no endpoint found.
|
||||
*/
|
||||
uint8_t USBD_CoreGetEPAdd(USBD_HandleTypeDef *pdev, uint8_t ep_dir, uint8_t ep_type)
|
||||
uint8_t USBD_CoreGetEPAdd(USBD_HandleTypeDef *pdev, uint8_t ep_dir, uint8_t ep_type, uint8_t ClassId)
|
||||
{
|
||||
uint8_t idx;
|
||||
|
||||
/* Find the EP address in the selected class table */
|
||||
for (idx = 0; idx < pdev->tclasslist[pdev->classId].NumEps; idx++)
|
||||
for (idx = 0; idx < pdev->tclasslist[ClassId].NumEps; idx++)
|
||||
{
|
||||
if (((pdev->tclasslist[pdev->classId].Eps[idx].add & USBD_EP_IN) == ep_dir) && \
|
||||
(pdev->tclasslist[pdev->classId].Eps[idx].type == ep_type) && \
|
||||
(pdev->tclasslist[pdev->classId].Eps[idx].is_used != 0U))
|
||||
if (((pdev->tclasslist[ClassId].Eps[idx].add & USBD_EP_IN) == ep_dir) && \
|
||||
(pdev->tclasslist[ClassId].Eps[idx].type == ep_type) && \
|
||||
(pdev->tclasslist[ClassId].Eps[idx].is_used != 0U))
|
||||
{
|
||||
return (pdev->tclasslist[pdev->classId].Eps[idx].add);
|
||||
return (pdev->tclasslist[ClassId].Eps[idx].add);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -895,7 +895,7 @@ static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
|
||||
}
|
||||
else if (req->wValue == USB_FEATURE_TEST_MODE)
|
||||
{
|
||||
pdev->dev_test_mode = req->wIndex >> 8;
|
||||
pdev->dev_test_mode = (uint8_t)(req->wIndex >> 8);
|
||||
(void)USBD_CtlSendStatus(pdev);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user