USB device stack

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

Legacy Warning

This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.

Pull requests against this repository are no longer supported. Please raise against mbed OS 5 as documented above.

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Thu Apr 30 13:01:04 2015 +0100
Parent:
51:deafa44182d9
Child:
53:5534733abe31
Commit message:
Synchronized with git revision 3b811aedb1c127ceaeeaf179a7f1c11c3a1c7956

Full URL: https://github.com/mbedmicro/mbed/commit/3b811aedb1c127ceaeeaf179a7f1c11c3a1c7956/

S130 v1.0 from Nordic. This brings in a lot of BLE4.1 functionality

Changed in this revision

USBDevice/USBHAL_STM32F4.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/USBDevice/USBHAL_STM32F4.cpp	Thu Apr 23 08:45:28 2015 +0100
+++ b/USBDevice/USBHAL_STM32F4.cpp	Thu Apr 30 13:01:04 2015 +0100
@@ -307,7 +307,13 @@
 
 
 void USBHAL::usbisr(void) {
+    if (OTG_FS->GREGS.GINTSTS & (1 << 11)) { // USB Suspend
+        suspendStateChanged(1);
+    };
+
     if (OTG_FS->GREGS.GINTSTS & (1 << 12)) { // USB Reset
+        suspendStateChanged(0);
+
         // Set SNAK bits
         OTG_FS->OUTEP_REGS[0].DOEPCTL |= (1 << 27);
         OTG_FS->OUTEP_REGS[1].DOEPCTL |= (1 << 27);