arduino / ArduinoCore-samd

Arduino Core for SAMD21 CPU
GNU Lesser General Public License v2.1
470 stars 718 forks source link

RawHID support #339

Open timonsku opened 6 years ago

timonsku commented 6 years ago

It would be great to get the HID device capabilities extended by raw HID. Raw HID is a great way for very robust bidirectional communication with a USB host application. This is implemented for Teensy and by NicoHood for older AVR Arduinos. It would be incredibly helpful to have this functionality implemented for the SAMD line as well.

For some extended reasonsing as to why this is an important feature. See my post in the CircuitPython HID repo: https://github.com/adafruit/Adafruit_CircuitPython_HID/issues/25#issuecomment-409014365

https://github.com/PaulStoffregen/cores/tree/master/usb_rawhid https://github.com/NicoHood/HID/tree/master/src/SingleReport

timonsku commented 6 years ago

Seems this should go into the developer mailing list instead.

cmaglie commented 6 years ago

Hi @PTS93

we are going to add PluggableUSB support on SAMD, there are chances to reuse the library from @NicoHood.

timonsku commented 6 years ago

That would be great! Can I track the development of that feature somewhere? The header exists since 2015. Is it only a partial implementation? https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/USB/PluggableUSB.h

gigaj0ule commented 6 years ago

You can use the original pluggableUSB compatible HID library to define any report descriptor you like. I have an example if you would like to see it.

timonsku commented 6 years ago

Sure, would definitely be interesting!

NicoHood commented 6 years ago

This could work now: https://github.com/NicoHood/HID

gigaj0ule commented 6 years ago

Here ya go https://github.com/adammunich/customHID

timonsku commented 6 years ago

@NicoHood thank you, that is really awesome!

@adammunich thanks for sharing!