Adaptation of the official mbed USBHost repository to work with the LPC4088 Display Module

Dependents:   DMSupport DMSupport DMSupport DMSupport

Fork of DM_USBHost by EmbeddedArtists AB

Revision:
27:aa2fd412f1d3
Parent:
24:868cbfe611a7
Child:
31:9a462d032742
diff -r 607951c26872 -r aa2fd412f1d3 USBHost/USBHALHost.h
--- a/USBHost/USBHALHost.h	Mon Aug 18 13:45:26 2014 +0100
+++ b/USBHost/USBHALHost.h	Tue Dec 02 15:16:39 2014 +0000
@@ -19,13 +19,36 @@
 
 #include "USBHostTypes.h"
 #include "USBHostConf.h"
+#include "rtos.h"
 
 class USBHostHub;
 
+#if defined(TARGET_LPC4088)
+  #define HcRevision        Revision
+  #define HcControl         Control
+  #define HcCommandStatus   CommandStatus
+  #define HcInterruptStatus InterruptStatus
+  #define HcInterruptEnable InterruptEnable
+  #define HcHCCA            HCCA
+  #define HcControlHeadED   ControlHeadED
+  #define HcBulkHeadED      BulkHeadED
+  #define HcFmInterval      FmInterval
+  #define HcFmNumber        FmNumber
+  #define HcPeriodicStart   PeriodicStart
+  #define HcRhStatus        RhStatus
+  #define HcRhPortStatus1   RhPortStatus1
+  #define HcRhPortStatus2   RhPortStatus2
+  #define OTGStCtrl         StCtrl
+#endif
+
 /**
 * USBHALHost class
 */
 class USBHALHost {
+public:
+    uint8_t* getSafeMem(uint32_t size);
+    void returnSafeMem(uint8_t* mem);
+        
 protected:
 
     /**
@@ -164,6 +187,8 @@
 
     bool volatile  edBufAlloc[MAX_ENDPOINT];
     bool volatile tdBufAlloc[MAX_TD];
+
+    Mutex safemem_mutex;
 };
 
 #endif