Subdirectory provided by Embedded Artists

Dependencies:   DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos mbed-src

Dependents:   lpc4088_displaymodule_hello_world_Sept_2018

Fork of DMSupport by Embedded Artists

Revision:
31:d47cffcb0a3e
Parent:
9:a33326afd686
Child:
38:420cdc281467
--- a/FileSystems/MCIFileSystem.cpp	Mon Jan 26 15:24:15 2015 +0100
+++ b/FileSystems/MCIFileSystem.cpp	Tue Feb 17 10:41:48 2015 +0100
@@ -20,6 +20,7 @@
 
 #include "MCIFileSystem.h"
 #include "mbed_debug.h"
+#include "rtos.h"
 
 #include "diskio.h" //STA_* defines
 #include "gpdma.h"
@@ -34,7 +35,7 @@
 
 #define DATA_TIMER_VALUE_R           (SDC_TRAN_CLOCK_RATE / 4)    // 250ms
 #define DATA_TIMER_VALUE_W           (SDC_TRAN_CLOCK_RATE)    // 1000ms
-#define ACQUIRE_DELAY       (0.100f)      /*!< inter-command acquire oper condition delay in seconds */
+#define ACQUIRE_DELAY       (100)      /*!< inter-command acquire oper condition delay in milliseconds */
 
 #define SYSCTL_CLOCK_SDC    (1<<28)
 
@@ -827,7 +828,7 @@
     return Ret;
   }
 
-  wait(ACQUIRE_DELAY);
+  Thread::wait(ACQUIRE_DELAY);
 
   /* Send interface operation condiftion */
   Ret = mci_SendIfCond();
@@ -860,7 +861,7 @@
       uint32_t OCR;
       /* Enter to Open Drain mode */
       mci_PowerControl(PowerOn, SDC_PWR_OPENDRAIN);
-      wait(ACQUIRE_DELAY);
+      Thread::wait(ACQUIRE_DELAY);
       Ret = mci_SendOpCond(&OCR);
       if (Ret != SDC_RET_OK) {
         return Ret;
@@ -1494,10 +1495,7 @@
 
 void MCIFileSystem::mci_WriteDelay() const
 {
-//  volatile uint8_t i;
-//  for ( i = 0; i < 0x10; i++ ) {  /* delay 3MCLK + 2PCLK  */
-//  }
-  wait(0.00001f); /* delay 10 us */
+  wait_us(10);
 }
 
 MCIFileSystem::ReturnCode MCIFileSystem::mci_SendCmd(uint32_t Command, uint32_t Arg, uint32_t timeout) const