A board support package for the LPC4088 Display Module.
Dependencies: DM_HttpServer DM_USBHost
Dependents: lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more
Fork of DMSupport by
Diff: FileSystems/MCIFileSystem.cpp
- Revision:
- 41:e06e764ff4fd
- Parent:
- 40:6df4f63aa406
- Child:
- 42:bbfe299d4a0c
--- a/FileSystems/MCIFileSystem.cpp Wed Jun 10 09:54:15 2015 +0000 +++ b/FileSystems/MCIFileSystem.cpp Wed Oct 23 06:59:29 2019 +0000 @@ -345,22 +345,6 @@ Send CSR ACMD51 R1 x */ /** - * @brief Possible SDMMC card state types - */ -typedef enum { - SDMMC_IDLE_ST = 0, /*!< Idle state */ - SDMMC_READY_ST, /*!< Ready state */ - SDMMC_IDENT_ST, /*!< Identification State */ - SDMMC_STBY_ST, /*!< standby state */ - SDMMC_TRAN_ST, /*!< transfer state */ - SDMMC_DATA_ST, /*!< Sending-data State */ - SDMMC_RCV_ST, /*!< Receive-data State */ - SDMMC_PRG_ST, /*!< Programming State */ - SDMMC_DIS_ST /*!< Disconnect State */ -} SDMMC_STATE_T; - - -/** * @brief SD/MMC commands, arguments and responses * Standard SD/MMC commands (3.1) type argument response */ @@ -768,7 +752,7 @@ uint64_t MCIFileSystem::disk_sectors() { - debug_if(MCI_DBG, "mcifs:disk_sectors(), _Stat = %#x, returning %llu\n", _Stat, _sdCardInfo.blocknr); + debug_if(MCI_DBG, "mcifs:disk_sectors(), _Stat = %#x, returning %u\n", _Stat, _sdCardInfo.blocknr); return _sdCardInfo.blocknr; } @@ -882,7 +866,7 @@ return Ret; } - Thread::wait(ACQUIRE_DELAY); + ThisThread::sleep_for(ACQUIRE_DELAY); /* Send interface operation condiftion */ Ret = mci_SendIfCond(); @@ -915,7 +899,7 @@ uint32_t OCR; /* Enter to Open Drain mode */ mci_PowerControl(PowerOn, SDC_PWR_OPENDRAIN); - Thread::wait(ACQUIRE_DELAY); + ThisThread::sleep_for(ACQUIRE_DELAY); Ret = mci_SendOpCond(&OCR); if (Ret != SDC_RET_OK) { return Ret; @@ -1449,7 +1433,7 @@ { ReturnCode Ret = SDC_RET_OK; uint32_t status = 0; - SDMMC_STATE_T state; + CardState state; /* get current state of the card */ Ret = mci_GetStatus(rca, &status); @@ -1459,7 +1443,7 @@ } /* check card state in response */ - state = (SDMMC_STATE_T) R1_CURRENT_STATE(status); + state = (CardState) R1_CURRENT_STATE(status); switch (state) { case SDMMC_STBY_ST: /* put card in 'Trans' state */ @@ -1469,7 +1453,7 @@ return Ret; } mci_GetStatus(rca, &status); - if (((SDMMC_STATE_T) R1_CURRENT_STATE(status)) != SDMMC_TRAN_ST) { + if (((CardState) R1_CURRENT_STATE(status)) != SDMMC_TRAN_ST) { return SDC_RET_ERR_STATE; } break;