...
void FSDev_SD_Card_BSP_CmdDataWr (FS_QTY unit_nbr,
...
FS_DEV_SD_CARD_CMD *p_cmd,
...
void *p_src,
...
FS_DEV_SD_CARD_ERR *p_err);
...
File |
...
...
Called from |
...
...
Code enabled by |
...
|
...
|
...
...
N/A |
Anchor
Arguments
...
unit_nbr
Unit number of SD/MMC card.
...
p_cmd
Pointer to command that was started.
...
p_src
Pointer to source buffer.
...
p_err
Pointer to variable that will receive the return error code from this function:
...
class | WebWorks_Indent_1 |
---|
...
FS_DEV_SD_CARD_ERR_NONE
...
class | WebWorks_Indent_2 |
---|
...
No error.
...
class | WebWorks_Indent_1 |
---|
...
...
FS_DEV_SD_CARD_ERR_NO_CARD
...
class | WebWorks_Indent_2 |
---|
...
No card present.
...
class | WebWorks_Indent_1 |
---|
...
...
FS_DEV_SD_CARD_ERR_UNKNOWN
...
class | WebWorks_Indent_2 |
---|
...
Unknown or other error.
...
class | WebWorks_Indent_1 |
---|
...
...
FS_DEV_SD_CARD_ERR_WAIT_TIMEOUT
...
class | WebWorks_Indent_2 |
---|
...
Timeout in waiting for data.
...
class | WebWorks_Indent_1 |
---|
...
...
FS_DEV_SD_CARD_ERR_DATA_UNDERRUN
...
...
Data underrun.
...
class | WebWorks_Indent_1 |
---|
...
FS_DEV_SD_CARD_ERR_DATA_CHKSUM
...
class | WebWorks_Indent_2 |
---|
...
Error in data checksum.
...
class | WebWorks_Indent_1 |
---|
...
FS_DEV_SD_CARD_ERR_DATA_START_BIT
...
...
Data start bit error.
...
class | WebWorks_Indent_1 |
---|
...
FS_DEV_SD_CARD_ERR_DATA
...
class | WebWorks_Indent_2 |
---|
...
Other data error.
...
Returned Value
Anchor
Notes/Warnings
Anchor
Example
...
The implementation of FSDev_SD_Card_BSP_CmdDataWr()
in Listing C Listing C-10 is targeted for the same host controller as the other listings in this chapter; for more information, see FSDev_SD_Card_BSP_CmdStart()
. Anchor
...
...
Listing C-10 FSDev_SD_Card_BSP_CmdDataWr(
...
)
LC-10(1) Wait until data transfer completes or an error occurs. The wait loop (or wait on semaphore) SHOULD always have a timeout to avoid blocking the task in the case of an unforeseen hardware malfunction or a software flaw.
...
LC-10(2) Check if an error occurred. The error status register is decoded to produce the actual error condition. That is not necessary, strictly, but error counters that accumulate within the generic driver based upon returned error values may be useful while debugging a port.
...
LC-10(3) Return no error. The data has been transferred already from the memory buffer using DMA.