Fred wrote: Mon Sep 08, 2025 2:53 pmDoes it means than you can't do some stuff on MacOS or is it only informative data ?
This is a helper function and it reads data from USB descriptor by index. It is for information only (not for transmitting/receiving data).
Here USB Device Descriptor
Code: Select all
/* USB Standard Device Descriptor */
const uint8_t CustomHID_DeviceDescriptor[CUSTOMHID_SIZ_DEVICE_DESC] =
{
0x12, /*bLength */
USB_DEVICE_DESCRIPTOR_TYPE, /*bDescriptorType*/
0x00, /*bcdUSB */
0x02,
0x00, /*bDeviceClass*/
0x00, /*bDeviceSubClass*/
0x00, /*bDeviceProtocol*/
0x40, /*bMaxPacketSize40*/
0x83, /*idVendor (0x0483)*/
0x04,
0x50, /*idProduct = 0x5750*/
0x57,
0x00, /*bcdDevice rel. 2.00*/
0x02,
1, /*Index of string descriptor describing manufacturer */
2, /*Index of string descriptor describing product*/
3, /*Index of string descriptor describing the device serial number */
0x01 /*bNumConfigurations*/
}
; /* CustomHID_DeviceDescriptor */
The numbers 1, 2, 3 in the descriptor are the index of the unicode strings that the reads function GetHIDIndexedString().
Similar information can be read using the function HIDInfo() with parameters #PB_HID_Manufacturer, #PB_HID_Product and #PB_HID_SerialNumber.