STMicroelectronics / stm32_mw_usb_device

Provides the USB Device library part of the STM32Cube MCU Component "middleware" for all STM32xx series.
Other
88 stars 14 forks source link

Support multiple CustomHID interfaces with CompositeBuilder #15

Open XelaRellum opened 11 months ago

XelaRellum commented 11 months ago

Right now there is one report descriptor size for all CustomHID interfaces, defined with USBD_CUSTOM_HID_REPORT_DESC_SIZE.

To adress this, the structure USBD_CUSTOM_HID_ItfTypeDef should contain a field with the actual report descriptor size.

TOUNSTM commented 11 months ago

Hello @XelaRellum,

Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.

With Regards,

ALABSTM commented 7 months ago

Hi @XelaRellum,

Please excuse this delayed reply.

Regarding the size of the report descriptor, I see this line in the USBD_CUSTOM_HID_Setup() function.

https://github.com/STMicroelectronics/stm32_mw_usb_device/blob/7b5e6886d2f11ad15d2b46364e8a96984358f639/Class/CustomHID/Src/usbd_customhid.c#L409

Structure member wLenght is defined in the structure below.

https://github.com/STMicroelectronics/stm32_mw_usb_device/blob/7b5e6886d2f11ad15d2b46364e8a96984358f639/Core/Inc/usbd_def.h#L197-L204

Maybe the report size could be defined there, in the frame of the setup request? Doing so, the size would be any value chosen at application level, and not necessarily the one defined by USBD_CUSTOM_HID_REPORT_DESC_SIZE.

With regards,

ALABSTM commented 7 months ago

ST Internal Reference: 173362

ALABSTM commented 7 months ago

Hi again,

Proposal forwarded to our development teams.

With regards,