I used Mouse.begin() to try out the HID mouse functionality on photon. It successfully enumerates. It registers a IN endpoint address of 0x85. Can I know where this endpoint address are mentioned in the source code ?
I tried searching for it but couldn’t find it. I would like to tweak the value so as to create a custom HID device.
I went through the file but it seems like the photon is not using these descriptors to enumerate.
For eg. the HID_IN_EP address is 0x86 but it registers as 0x85 in my system. Moreover changing values in these descriptors doesn’t seems to have any effect on the enumeration part.
If someone can replicate what i am seeing, then we may come to a conclusion.
This is is not currently supported unless building custom system firmware and diving deep into the source code.
A design is being worked on for a new API to allow custom HID devices in user firmware, but I don’t have a schedule for which system firmware release it will be in. I think this is the issue to follow for updates:
Well, my confusion is that why the change in descriptors in ubsd_hid_core.c is not reflected on USB enumeration even though i am compiling the whole source code ?
Hey,
Finally found the source file, they are :
platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc/usbd_conf.h
platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc/usbd_mhid.h
platform/MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_mhid.c
Changing the descriptors in these files and compiling from scratch works !