Skip to content

Support multiple CustomHID interfaces with CompositeBuilder #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
XelaRellum opened this issue Sep 25, 2023 · 5 comments
Closed

Support multiple CustomHID interfaces with CompositeBuilder #15

XelaRellum opened this issue Sep 25, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system mw Middleware-related issue or pull-request. usb USB-related (host or device) issue or pull-request
Milestone

Comments

@XelaRellum
Copy link

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 TOUNSTM added the mw Middleware-related issue or pull-request. label Oct 3, 2023
@TOUNSTM
Copy link

TOUNSTM commented Oct 3, 2023

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 ALABSTM added enhancement New feature or request usb USB-related (host or device) issue or pull-request labels Oct 13, 2023
@ALABSTM
Copy link
Collaborator

ALABSTM commented Feb 13, 2024

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
Copy link
Collaborator

ALABSTM commented Feb 13, 2024

ST Internal Reference: 173362

@ALABSTM ALABSTM added the internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system label Feb 13, 2024
@ALABSTM
Copy link
Collaborator

ALABSTM commented Feb 13, 2024

Hi again,

Proposal forwarded to our development teams.

With regards,

@ALABSTM
Copy link
Collaborator

ALABSTM commented Apr 16, 2025

Hi @XelaRellum,

You request has finally been considered in version 2.11.4 of the library, which has just been released. Below are some code snippets:

#ifdef USBD_CUSTOMHID_REPORT_DESC_SIZE_ENABLED
pDesc->wItemLength = ((USBD_CUSTOM_HID_ItfTypeDef *)pdev->pUserData[pdev->classId])->wReportDescLen;
#else
pDesc->wItemLength = USBD_CUSTOM_HID_REPORT_DESC_SIZE;
#endif /* USBD_CUSTOMHID_REPORT_DESC_SIZE_ENABLED */

#ifdef USBD_CUSTOMHID_REPORT_DESC_SIZE_ENABLED
uint16_t wReportDescLen;
#endif /* USBD_CUSTOMHID_REPORT_DESC_SIZE_ENABLED */

Thank you for your patience and thank you again for your proposal.

With regards,

@ALABSTM ALABSTM closed this as completed Apr 16, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in stm32cube-mcu-mw-dashboard Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system mw Middleware-related issue or pull-request. usb USB-related (host or device) issue or pull-request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants