USB device stack

Dependents:   mbed-mX-USB-TEST1 USBMSD_SD_HID_HelloWorld HidTest MIDI_usb_bridge ... more

Issue: Writing to Host over USBSerial with KL25Z

I found an issue on a KL25Z where the 'Wait for completion' portion of the USBDevice::write method would go into an infinite loop after the first byte was sent by the KL25Z to a computer over USBSerial. I was able to fix this by instantiating epComplete to 0x20 in USBHAL_KL25Z.cpp with this line:

static volatile int epComplete = 0x20;

Example program