RogerClark wrote:There is a branch of the repo where I integrated the various USB changes
https://github.com/rogerclarkmelbourne/ ... addMidiHID
I was hoping to merge this back into the master of the repo, but the problem is that if a user selects any USB device except Serial, they will not be able to upload withe the bootloader as there no way to reset the processor except via Serial ( at the moment)
I would think that the additional USB descriptors (or how it's called) are not active unless the user program calls HID.begin() or something similar. Then it's responsibility of the user space programmer to call the HID.begin() only if they don't want to upload a new firmware. Something along the following lines:
Code: Select all
if (digitalRead(XX)) HID.begin();
This way they could ground the XX pin temporarily to disable the HID initialization when they needed to flash new firmware via USB serial. Calling the HID.begin() unconditionally in the firmware is not smart at all.
BTW, I personally use USB HID for communication (on AVR, both using V-USB and LUFA) so it would be great if this implementation wasn't limited to keyboard/joystick/mouse but allowed also a generic HID descriptor and offered simple send/receive routines.