cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between the two USB HID device classes in STM32CubeMX?

SNorm.1
Associate III

I want to use the STM32CubeMX code generation tool to generate the USB HID device class driver code, I found that in the USB DEVICE drop-down list box options, there are two HID device class options to choose from, are Custom Human Interface Device Class and Human Interface Device Class, I checked the USB official web list of USB device classes, found that only the Human Interface Device Class, a standard HID class devices. So, what type of HID device is the Custom Human Interface Device Class in the tool? Is it a user-defined HID class device and what are the similarities and differences between it and a standard HID class device? Is there any information available on this?

0693W00000DmWB4QAN.png

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

The "Custom HID" class is a limited example of a HID compatible device which is not a keyboard or mouse.

The other "HID class" is example of a joystick/mouse device.

https://github.com/STMicroelectronics/stm32_mw_usb_device/blob/5af065de854f4573511e023aa76c3462c60a0a21/Class/HID/Src/usbd_hid.c#L18

Feel free to extend and modify these examples for your needs.

For more functionality and more standard classes, consider USB libraries from various software vendors or google for projects on github.

--pa

View solution in original post

2 REPLIES 2
Pavel A.
Evangelist III

The "Custom HID" class is a limited example of a HID compatible device which is not a keyboard or mouse.

The other "HID class" is example of a joystick/mouse device.

https://github.com/STMicroelectronics/stm32_mw_usb_device/blob/5af065de854f4573511e023aa76c3462c60a0a21/Class/HID/Src/usbd_hid.c#L18

Feel free to extend and modify these examples for your needs.

For more functionality and more standard classes, consider USB libraries from various software vendors or google for projects on github.

--pa

Thank you very much for your reply! I get it now.