Functions | |
int32_t | Lpc177x_8x_MciInit (uint8_t powerActiveLevel) |
Do initialization the MCI block as set its clock, registers, setup NVIC for interrupts, configure the pins used for MCI function, do initialize the card in slot... | |
void | Lpc177x_8x_MciSendCmd (uint32_t CmdIndex, uint32_t Argument, uint32_t ExpectResp, uint32_t AllowTimeout) |
The routine is used to send a CMD to the card. | |
int32_t | Lpc177x_8x_MciGetCmdResp (uint32_t CmdIndex, uint32_t NeedRespFlag, uint32_t *CmdRespStatus) |
The routine is to get the reponse from card after commands. This function is always used in pair of Lpc177x_8x_MciSendCmd() func. | |
int32_t | Lpc177x_8x_MciCmdResp (uint32_t CmdIndex, uint32_t Argument, uint32_t ExpectResp, uint32_t *CmdResp, uint32_t AllowTimeout) |
The routine is to send command to cards then get back the reponses (if required). | |
void | Lpc177x_8x_MciSet_MCIClock (uint32_t clockrate) |
Set MCI clock rate, during initialization phase < 400K during data phase < 20Mhz. | |
int32_t | Lpc177x_8x_MciSetBusWidth (uint32_t width) |
Set the Width to 1-bit Bus or 4-bit Bus. | |
int32_t | Lpc177x_8x_MciAcmd_SendOpCond (uint8_t hcsVal) |
Send ACMD41 (SEND_APP_OP_COND) to Host Capacity Support (HCS) information and asks the accessed card to send its operating condition (OCR). | |
int32_t | Lpc177x_8x_MciCardInit (void) |
Do initialization for the card in the slot. | |
en_Mci_CardType | Lpc177x_8x_MciGetCardType (void) |
Get the type of card that is currently used in the slot. | |
int32_t | Lpc177x_8x_MciCardReset (void) |
To reset the card, the CMD0 is sent and then the card is put in idle state. This is the very first command to be sent to initialize either MMC or SD card. | |
int32_t | Lpc177x_8x_MciCmd_SendIfCond (void) |
Send CMD8 (SEND_IF_COND) for interface condition to card. | |
int32_t | Lpc177x_8x_MciGetCID (st_Mci_CardId *cidValue) |
Get the all the Identifier (CID) of the card by sending the CMD2 (ALL_SEND_CID) command. Then parse 4-byte data obtained from the card by the CID meaning. | |
int32_t | Lpc177x_8x_MciSetCardAddress (void) |
Set the address for the card in the slot by sending CMD3 (SET_RELATIVE_ADDR) command. To get the address of the card currently in used, needs to call Lpc177x_8x_MciGetCardAddress() | |
uint32_t | Lpc177x_8x_MciGetCardAddress (void) |
Get the address for the card in the slot. | |
int32_t | Lpc177x_8x_MciGetCSD (uint32_t *csdVal) |
Get the Card-Specific Data of in-slot card by sending CMD9 (SEND_CSD) command. | |
int32_t | Lpc177x_8x_MciCmd_SelectCard (void) |
Select the card by the specified address. This is done by sending out the CMD7 with the address argument to needed card. | |
int32_t | Lpc177x_8x_MciGetCardStatus (int32_t *cardStatus) |
Get the status of the card. The return is from the card. By sending CMD13 (SEND_STATUS), the status of the card will be responded from card addressed. | |
uint32_t | Lpc177x_8x_MciGetDataXferEndState (void) |
Get the state of data transfer to see if it is ended or not. | |
uint32_t | Lpc177x_8x_MciGetXferErrState (void) |
Get the error state of the lastest data transfer. | |
int32_t | Lpc177x_8x_MciSetBlockLen (uint32_t blockLength) |
Set the length for the blocks in the next action on data manipulation (as read, write, erase). This function is to send CMD16 (SET_BLOCK_LEN) to cards. | |
int32_t | Lpc177x_8x_MciAcmd_SendBusWidth (uint32_t buswidth) |
Set bus-width (1 bit or 4 bit) to work with the card by command CMD6 (SET_ACMD_BUS_WIDTH). | |
int32_t | Lpc177x_8x_MciCmd_StopTransmission (void) |
Stop the current transmission on the bus by sending command CMD12 (STOP_TRANSMISSION). In this case, the card may be in a unknown state. So that it need a warm reset for normal operation. | |
int32_t | Lpc177x_8x_MciCmd_WriteBlock (uint32_t blockNum, uint32_t numOfBlock) |
Write blocks to card by sending command CMD24 (WRITE_BLOCK) or command CMD25 (WRITE_MULTIPLE_BLOCK) followed by the blocks of data to be written. | |
int32_t | Lpc177x_8x_MciCmd_ReadBlock (uint32_t blockNum, uint32_t numOfBlock) |
Read blocks to card by sending CMD17 (READ_SINGLE_BLOCK) or CMD18 (READ_MULTIPLE_BLOCK) commands followed by the blocks of data to be read. | |
int32_t | Lpc177x_8x_MciWriteBlock (uint8_t *memblock, uint32_t blockNum, uint32_t numOfBlock) |
Write data at a specific address to starting block with number of blocks will be written from first block. | |
int32_t | Lpc177x_8x_MciReadBlock (uint8_t *destBlock, uint32_t blockNum, uint32_t numOfBlock) |
Read data at a specific address to starting block with number of blocks will be read from first block. | |
Variables | |
uint8_t | mci_cid::MID |
uint16_t | mci_cid::OID |
uint8_t | mci_cid::PNM_H |
uint32_t | mci_cid::PNM_L |
uint8_t | mci_cid::PRV |
uint32_t | mci_cid::PSN |
uint8_t | mci_cid::reserved |
uint16_t | mci_cid::MDT |
uint8_t | mci_cid::CRC |
uint8_t | mci_cid::unused |
Do initialization the MCI block as set its clock, registers, setup NVIC for interrupts, configure the pins used for MCI function, do initialize the card in slot...
[in] | powerActiveLevel | the power level to activate the card in slot |
References CLKPWR_PCONP_PCSDC, GPIO_CFG_OUTPUT, GPIO_CFG_PERIPHERAL2, GpioPinConfigSet(), GpioPinSetHigh, GpioPinSetLow, LOW_LVL, Lpc177x_8x_MciCardInit(), Lpc177x_8x_MciSet_MCIClock(), LPC_MCI, LPC_SC, MCI_CARD_UNKNOWN, MCI_CardType, MCI_SLOW_RATE, NutDelay(), NUTGPIO_PORT1, NutIrqEnable(), NutRegisterIrqHandler(), sig_MCI, and SysCtlPeripheralClkEnable.
void Lpc177x_8x_MciSendCmd | ( | uint32_t | CmdIndex, |
uint32_t | Argument, | ||
uint32_t | ExpectResp, | ||
uint32_t | AllowTimeout | ||
) |
The routine is used to send a CMD to the card.
[in] | CmdIndex | the command to be sent to cards |
[in] | Argument | the argument follows the command |
[in] | ExpectResp | the response type for the command. They may be:
|
[in] | AllowTimeout | allow timeout the command or not |
References ALLOW_CMD_TIMER, EXPECT_LONG_RESP, EXPECT_NO_RESP, EXPECT_SHORT_RESP, LPC_MCI, MCI_CMD_ACTIVE, and MCI_DISABLE_CMD_TIMER.
Referenced by Lpc177x_8x_MciCardReset(), and Lpc177x_8x_MciCmdResp().
int32_t Lpc177x_8x_MciGetCmdResp | ( | uint32_t | ExpectCmdData, |
uint32_t | ExpectResp, | ||
uint32_t * | CmdResp | ||
) |
The routine is to get the reponse from card after commands. This function is always used in pair of Lpc177x_8x_MciSendCmd() func.
[in] | ExpectCmdData | specify the command of which the data will be retrieved. This field should be the same with CmdIndex of Lpc177x_8x_MciSendCmd() function. |
[in] | ExpectResp | the response type for the command. They may be:
|
[out] | CmdResp | the buffer stored the data replied from cards |
References ACMD41_SEND_APP_OP_COND, CMD12_STOP_TRANSMISSION, CMD1_SEND_OP_COND, CMD2_ALL_SEND_CID, CMD9_SEND_CSD, EXPECT_LONG_RESP, EXPECT_NO_RESP, EXPECT_SHORT_RESP, INVALID_RESPONSE, LPC_MCI, MCI_CMD_CRC_FAIL, MCI_CMD_RESP_END, MCI_CMD_TIMEOUT, MCI_FUNC_OK, and NULL.
Referenced by Lpc177x_8x_MciCmdResp().
int32_t Lpc177x_8x_MciCmdResp | ( | uint32_t | CmdIndex, |
uint32_t | Argument, | ||
uint32_t | ExpectResp, | ||
uint32_t * | CmdResp, | ||
uint32_t | AllowTimeout | ||
) |
The routine is to send command to cards then get back the reponses (if required).
[in] | CmdIndex | the command to be sent to cards |
[in] | Argument | the argument follows the command |
[in] | ExpectResp | the response type for the command. They may be:
|
[out] | CmdResp | the buffer stored the data replied from cards |
[in] | AllowTimeout | allow timeout the command or not |
References EXPECT_NO_RESP, Lpc177x_8x_MciGetCmdResp(), Lpc177x_8x_MciSendCmd(), MCI_FUNC_BAD_PARAMETERS, and NULL.
Referenced by Lpc177x_8x_MciAcmd_SendBusWidth(), Lpc177x_8x_MciAcmd_SendOpCond(), Lpc177x_8x_MciCmd_ReadBlock(), Lpc177x_8x_MciCmd_SelectCard(), Lpc177x_8x_MciCmd_SendACMD(), Lpc177x_8x_MciCmd_SendIfCond(), Lpc177x_8x_MciCmd_SendOpCond(), Lpc177x_8x_MciCmd_StopTransmission(), Lpc177x_8x_MciCmd_WriteBlock(), Lpc177x_8x_MciGetCardStatus(), Lpc177x_8x_MciGetCID(), Lpc177x_8x_MciGetCSD(), Lpc177x_8x_MciSetBlockLen(), and Lpc177x_8x_MciSetCardAddress().
void Lpc177x_8x_MciSet_MCIClock | ( | uint32_t | ClockRate | ) |
Set MCI clock rate, during initialization phase < 400K during data phase < 20Mhz.
[in] | ClockRate | Clock rate to be set |
References Lpc17xx_ClockGet(), LPC_MCI, MCI_NORMAL_RATE, MCI_SLOW_RATE, MCLKDIV_NORMAL, MCLKDIV_SLOW, and NUT_HWCLK_PERIPHERAL.
Referenced by Lpc177x_8x_MciInit().
Set the Width to 1-bit Bus or 4-bit Bus.
[in] | width | buswidth expected to set |
References BUS_WIDTH_4BITS, Lpc177x_8x_MciAcmd_SendBusWidth(), LPC_MCI, MCI_FUNC_FAILED, MCI_FUNC_OK, SD_1_BIT, and SD_4_BIT.
Send ACMD41 (SEND_APP_OP_COND) to Host Capacity Support (HCS) information and asks the accessed card to send its operating condition (OCR).
[in] | hcsVal | input the Host Capacity Support |
References ACMD41_SEND_APP_OP_COND, ALLOW_CMD_TIMER, CCS, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmd_SendACMD(), Lpc177x_8x_MciCmdResp(), Lpc177x_8x_MciSetOutputMode(), MCI_ACMD41_HCS_POS, MCI_CMD_TIMEOUT, MCI_FUNC_BUS_NOT_IDLE, MCI_FUNC_FAILED, MCI_FUNC_OK, MCI_FUNC_TIMEOUT, MCI_OUTPUT_MODE_PUSHPULL, and OCR_INDEX.
Referenced by Lpc177x_8x_MciCardInit().
int32_t Lpc177x_8x_MciCardInit | ( | void | ) |
Do initialization for the card in the slot.
Try CMD1 first for MMC, if it's timeout, try CMD55 and CMD41 for SD, if both failed, initialization faliure, bailout with unknown card type. Otherwise, return the card type, either MMC or SD. <<<KHOA_110708: checking>>>
This is followed Figure 4-2: Card Initialization and Identification Flow (SD mode) in Physical Layer Simplified Specification Version 2.00 document
None |
References CCS, Lpc177x_8x_MciAcmd_SendOpCond(), Lpc177x_8x_MciCardReset(), Lpc177x_8x_MciCmd_SendIfCond(), Lpc177x_8x_MciCmd_SendOpCond(), Lpc177x_8x_MciSetOutputMode(), MCI_AddressingMode, MCI_CARD_UNKNOWN, MCI_CardType, MCI_FUNC_BAD_PARAMETERS, MCI_FUNC_FAILED, MCI_FUNC_OK, MCI_MMC_CARD, MCI_OUTPUT_MODE_OPENDRAIN, MCI_OUTPUT_MODE_PUSHPULL, MCI_SDHC_SDXC_CARD, MCI_SDSC_V1_CARD, MCI_SDSC_V2_CARD, MMC_BLOCK_MODE, and MMC_BYTE_MODE.
Referenced by Lpc177x_8x_MciInit().
en_Mci_CardType Lpc177x_8x_MciGetCardType | ( | void | ) |
Get the type of card that is currently used in the slot.
None |
References MCI_CardType.
int32_t Lpc177x_8x_MciCardReset | ( | void | ) |
To reset the card, the CMD0 is sent and then the card is put in idle state. This is the very first command to be sent to initialize either MMC or SD card.
None |
References CMD0_GO_IDLE_STATE, EXPECT_NO_RESP, Lpc177x_8x_MciSendCmd(), and MCI_FUNC_OK.
Referenced by Lpc177x_8x_MciCardInit().
int32_t Lpc177x_8x_MciCmd_SendIfCond | ( | void | ) |
Send CMD8 (SEND_IF_COND) for interface condition to card.
None |
References ALLOW_CMD_TIMER, CMD8_SEND_IF_COND, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), MCI_CMD8_CHECKPATTERN_BMASK, MCI_CMD8_VOLTAGESUPPLIED_BMASK, MCI_CMD8_VOLTAGESUPPLIED_POS, MCI_CMD_TIMEOUT, MCI_FUNC_BAD_PARAMETERS, MCI_FUNC_FAILED, MCI_FUNC_OK, and MCI_FUNC_TIMEOUT.
Referenced by Lpc177x_8x_MciCardInit().
int32_t Lpc177x_8x_MciGetCID | ( | st_Mci_CardId * | cidValue | ) |
Get the all the Identifier (CID) of the card by sending the CMD2 (ALL_SEND_CID) command. Then parse 4-byte data obtained from the card by the CID meaning.
[out] | cidValue | the CID Result after parsing the data from the card |
References ALLOW_CMD_TIMER, CMD2_ALL_SEND_CID, mci_cid::CRC, EXPECT_LONG_RESP, Lpc177x_8x_MciCmdResp(), MCI_CID_CHECKSUM_ID_WBMASK, MCI_CID_CHECKSUM_ID_WPOS, MCI_CID_MANUFACTURER_ID_WBMASK, MCI_CID_MANUFACTURER_ID_WPOS, MCI_CID_MANUFACTURINGDATE_ID_WBMASK, MCI_CID_MANUFACTURINGDATE_ID_WPOS, MCI_CID_OEMAPPLICATION_ID_WBMASK, MCI_CID_OEMAPPLICATION_ID_WPOS, MCI_CID_PRODUCTNAME_ID_H_WBMASK, MCI_CID_PRODUCTNAME_ID_H_WPOS, MCI_CID_PRODUCTNAME_ID_L_WBMASK, MCI_CID_PRODUCTNAME_ID_L_WPOS, MCI_CID_PRODUCTREVISION_ID_WBMASK, MCI_CID_PRODUCTREVISION_ID_WPOS, MCI_CID_PRODUCTSERIALNUM_ID_H_WBMASK, MCI_CID_PRODUCTSERIALNUM_ID_H_WPOS, MCI_CID_PRODUCTSERIALNUM_ID_L_WBMASK, MCI_CID_PRODUCTSERIALNUM_ID_L_WPOS, MCI_CID_RESERVED_ID_WBMASK, MCI_CID_RESERVED_ID_WPOS, MCI_CID_UNUSED_ID_WBMASK, MCI_CID_UNUSED_ID_WPOS, MCI_CMD_TIMEOUT, MCI_FUNC_OK, MCI_FUNC_TIMEOUT, mci_cid::MDT, mci_cid::MID, NULL, mci_cid::OID, mci_cid::PNM_H, mci_cid::PNM_L, mci_cid::PRV, mci_cid::PSN, mci_cid::reserved, and mci_cid::unused.
int32_t Lpc177x_8x_MciSetCardAddress | ( | void | ) |
Set the address for the card in the slot by sending CMD3 (SET_RELATIVE_ADDR) command. To get the address of the card currently in used, needs to call Lpc177x_8x_MciGetCardAddress()
None |
References ALLOW_CMD_TIMER, CardRCA, CARDSTATEOF, CMD3_SET_RELATIVE_ADDR, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), MCI_CARDSTATE_IDENDTIFIED, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_CardType, MCI_CMD_TIMEOUT, MCI_FUNC_ERR_STATE, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, MCI_FUNC_OK, MCI_FUNC_TIMEOUT, MCI_SDHC_SDXC_CARD, MCI_SDSC_V1_CARD, MCI_SDSC_V2_CARD, and XSHIFT_.
uint32_t Lpc177x_8x_MciGetCardAddress | ( | void | ) |
Get the address for the card in the slot.
None |
References CardRCA.
Get the Card-Specific Data of in-slot card by sending CMD9 (SEND_CSD) command.
[out] | csdVal | a buffer stored the value of CSD obtained from the card |
References ALLOW_CMD_TIMER, CardRCA, CMD9_SEND_CSD, EXPECT_LONG_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_CardType, MCI_CMD_CRC_FAIL, MCI_CMD_RESP_END, MCI_CMD_TIMEOUT, MCI_FUNC_FAILED, MCI_FUNC_OK, MCI_SDHC_SDXC_CARD, MCI_SDSC_V1_CARD, MCI_SDSC_V2_CARD, and NULL.
int32_t Lpc177x_8x_MciCmd_SelectCard | ( | void | ) |
Select the card by the specified address. This is done by sending out the CMD7 with the address argument to needed card.
None |
References _SHIFT, ALLOW_CMD_TIMER, CardRCA, CARDSTATEOF, CMD7_SELECT_CARD, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_CARDSTATE_STBY, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_CardType, MCI_CMD_CRC_FAIL, MCI_CMD_RESP_END, MCI_CMD_TIMEOUT, MCI_FUNC_ERR_STATE, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, MCI_FUNC_OK, MCI_SDHC_SDXC_CARD, MCI_SDSC_V1_CARD, and MCI_SDSC_V2_CARD.
Get the status of the card. The return is from the card. By sending CMD13 (SEND_STATUS), the status of the card will be responded from card addressed.
[out] | cardStatus | the status returned from the card |
References _SHIFT, ALLOW_CMD_TIMER, CardRCA, CMD13_SEND_STATUS, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_CardType, MCI_CMD_CRC_FAIL, MCI_CMD_RESP_END, MCI_CMD_TIMEOUT, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, MCI_FUNC_OK, MCI_SDHC_SDXC_CARD, MCI_SDSC_V1_CARD, MCI_SDSC_V2_CARD, and NULL.
Referenced by Lpc177x_8x_MciCheckStatus().
uint32_t Lpc177x_8x_MciGetDataXferEndState | ( | void | ) |
Get the state of data transfer to see if it is ended or not.
None |
References Mci_Data_Xfer_End.
uint32_t Lpc177x_8x_MciGetXferErrState | ( | void | ) |
Get the error state of the lastest data transfer.
None |
References Mci_Data_Xfer_ERR.
Set the length for the blocks in the next action on data manipulation (as read, write, erase). This function is to send CMD16 (SET_BLOCK_LEN) to cards.
[in] | blockLength | the value for the length of block will be handled |
References _SHIFT, ALLOW_CMD_TIMER, CARDSTATEOF, CMD16_SET_BLOCK_LEN, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_CARDSTATE_TRAN, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_CMD_CRC_FAIL, MCI_CMD_RESP_END, MCI_CMD_TIMEOUT, MCI_FUNC_ERR_STATE, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, and MCI_FUNC_OK.
Set bus-width (1 bit or 4 bit) to work with the card by command CMD6 (SET_ACMD_BUS_WIDTH).
[in] | buswidth | The value represented for bus-width
|
References _SHIFT, ACMD6_SET_BUS_WIDTH, ALLOW_CMD_TIMER, CARDSTATEOF, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmd_SendACMD(), Lpc177x_8x_MciCmdResp(), MCI_CARDSTATE_TRAN, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_FUNC_ERR_STATE, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, and MCI_FUNC_OK.
Referenced by Lpc177x_8x_MciSetBusWidth().
int32_t Lpc177x_8x_MciCmd_StopTransmission | ( | void | ) |
Stop the current transmission on the bus by sending command CMD12 (STOP_TRANSMISSION). In this case, the card may be in a unknown state. So that it need a warm reset for normal operation.
[in] | None |
References _SHIFT, ALLOW_CMD_TIMER, CMD12_STOP_TRANSMISSION, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, and MCI_FUNC_OK.
Referenced by Lpc177x_8x_MciReadBlock(), and Lpc177x_8x_MciWriteBlock().
Write blocks to card by sending command CMD24 (WRITE_BLOCK) or command CMD25 (WRITE_MULTIPLE_BLOCK) followed by the blocks of data to be written.
[in] | blockNum | The block number to start writting |
[in] | numOfBlock | Determine how many blocks will be written (from the starting block) |
References ALLOW_CMD_TIMER, BLOCK_LENGTH, CARDSTATEOF, CMD24_WRITE_BLOCK, CMD25_WRITE_MULTIPLE_BLOCK, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_AddressingMode, MCI_CARDSTATE_TRAN, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_FUNC_ERR_STATE, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, MCI_FUNC_OK, MMC_BLOCK_MODE, and XSHIFT_.
Referenced by Lpc177x_8x_MciWriteBlock().
Read blocks to card by sending CMD17 (READ_SINGLE_BLOCK) or CMD18 (READ_MULTIPLE_BLOCK) commands followed by the blocks of data to be read.
[in] | blockNum | The block number to start reading |
[in] | numOfBlock | Determine how many blocks will be read (from the starting block) |
References _SHIFT, ALLOW_CMD_TIMER, BLOCK_LENGTH, CARDSTATEOF, CMD17_READ_SINGLE_BLOCK, CMD18_READ_MULTIPLE_BLOCK, EXPECT_SHORT_RESP, Lpc177x_8x_MciCmdResp(), LPC_MCI, MCI_AddressingMode, MCI_CARDSTATE_TRAN, MCI_CARDSTATUS_READYFORDATA_P0S, MCI_FUNC_ERR_STATE, MCI_FUNC_FAILED, MCI_FUNC_NOT_READY, MCI_FUNC_OK, and MMC_BLOCK_MODE.
Referenced by Lpc177x_8x_MciReadBlock().
Write data at a specific address to starting block with number of blocks will be written from first block.
[in] | *memblock | The pointer to location stored required data to be written to card |
[in] | blockNum | The block number to start writting |
[in] | numOfBlock | Determine how many blocks will be written (from the starting block) |
References BLOCK_LENGTH, DATA_BLOCK_LEN, DATA_TIMER_VALUE, dataSrcBlock, fifo_plane, Lpc177x_8x_MciCheckStatus(), Lpc177x_8x_MciCmd_StopTransmission(), Lpc177x_8x_MciCmd_WriteBlock(), Lpc177x_8x_MciTXEnable(), LPC_MCI, Mci_Data_Xfer_End, Mci_Data_Xfer_ERR, MCI_DATACTRL_DIR_TO_CARD, MCI_DATACTRL_ENABLE, MCI_DTATCTRL_BLOCKSIZE, MCI_FUNC_FAILED, MCI_FUNC_OK, and txBlockCnt.
Read data at a specific address to starting block with number of blocks will be read from first block.
[in] | *destBlock | The pointer to location will captured data read from card |
[in] | blockNum | The block number to start reading |
[in] | numOfBlock | Determine how many blocks will be read (from the starting block) |
References BLOCK_LENGTH, DATA_BLOCK_LEN, DATA_TIMER_VALUE, dataDestBlock, fifo_plane, Lpc177x_8x_MciCheckStatus(), Lpc177x_8x_MciCmd_ReadBlock(), Lpc177x_8x_MciCmd_StopTransmission(), Lpc177x_8x_MciRXEnable(), LPC_MCI, Mci_Data_Xfer_End, Mci_Data_Xfer_ERR, MCI_DATACTRL_DIR_FROM_CARD, MCI_DATACTRL_ENABLE, MCI_DTATCTRL_BLOCKSIZE, MCI_FUNC_FAILED, MCI_FUNC_OK, and rxBlockCnt.
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().
Referenced by Lpc177x_8x_MciGetCID().