Skip to content

USB composite CustomHID endpoint size configuration problem #300

@LaurentGolay

Description

@LaurentGolay

Brief description
USB composite CustomHID wrongly refers endpoint size definitons and mismatch IN and OUT endpoints configuration.

Describe the set-up
The board: (not relevant) custom board with STM32H7B0IBT6 MCU
IDE: (not relevant) STM32CubeIDE 1.16.1, GNU Tools for STM32 11.3rel1.

Describe the bug
USBD_CMPSIT_CUSTOMHIDDesc() in usbd_composite_builder.c uses wrong definition for Out Endpoint size configuration. It uses "CUSTOM_HID_EPIN_SIZE" instead of "CUSTOM_HID_EPOUT_SIZE", which will causes issues if sizes are different.
Similarly, SBD_CMPSIT_AddToConfDesc() function, in CLASS_TYPE_CHID case, refers to CUSTOM_HID_EPOUT_SIZE for both endpoint setting (with USBD_CMPSIT_AssignEp).

How To Reproduce
Configure a composite USB Device that includes a CustomHID interface.
Set different sizes for IN and OUT endpoints.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemmwMiddleware-related issue or pull-request.st usbSTMicroelectronics' Universal Serial Bus (Host or Device) libraryusbUniversal Serial Bus

Type

No type

Projects

Status

To release

Relationships

None yet

Development

No branches or pull requests

Issue actions