SD/MMC memory APIs required by CTRL_ACCESS module (Memory Control Access).
For usual application which use the SD/MMC card in memory mode through a file system or a USB device MSC, only a call of sd_mmc_init() function is required in the startup.
Modules | |
Implementation of SD/MMC Memory | |
Control Interface | |
Ctrl_status | sd_mmc_test_unit_ready (uint8_t slot) |
Tests the memory state and initializes the memory if required. More... | |
Ctrl_status | sd_mmc_test_unit_ready_0 (void) |
Instance Declaration for sd_mmc_test_unit_ready Slot O. More... | |
Ctrl_status | sd_mmc_test_unit_ready_1 (void) |
Instance Declaration for sd_mmc_test_unit_ready Slot 1. More... | |
Ctrl_status | sd_mmc_read_capacity (uint8_t slot, uint32_t *u32_nb_sector) |
Returns the address of the last valid sector in the memory. More... | |
Ctrl_status | sd_mmc_read_capacity_0 (uint32_t *u32_nb_sector) |
Instance Declaration for sd_mmc_read_capacity Slot O. More... | |
Ctrl_status | sd_mmc_read_capacity_1 (uint32_t *u32_nb_sector) |
Instance Declaration for sd_mmc_read_capacity Slot 1. More... | |
bool | sd_mmc_unload (uint8_t slot, bool unload) |
Unload/Load the SD/MMC card selected. More... | |
bool | sd_mmc_unload_0 (bool unload) |
Instance Declaration for sd_mmc_unload Slot O. More... | |
bool | sd_mmc_unload_1 (bool unload) |
Instance Declaration for sd_mmc_unload Slot 1. More... | |
bool | sd_mmc_wr_protect (uint8_t slot) |
Returns the write-protection state of the memory. More... | |
bool | sd_mmc_wr_protect_0 (void) |
Instance Declaration for sd_mmc_wr_protect Slot O. More... | |
bool | sd_mmc_wr_protect_1 (void) |
Instance Declaration for sd_mmc_wr_protect Slot 1. More... | |
bool | sd_mmc_removal (uint8_t slot) |
Tells whether the memory is removable. More... | |
bool | sd_mmc_removal_0 (void) |
Instance Declaration for sd_mmc_removal Slot O. More... | |
bool | sd_mmc_removal_1 (void) |
Instance Declaration for sd_mmc_removal Slot 1. More... | |
Ctrl_status sd_mmc_read_capacity | ( | uint8_t | slot, |
uint32_t * | u32_nb_sector | ||
) |
Returns the address of the last valid sector in the memory.
slot | SD/MMC Slot Card Selected. |
u32_nb_sector | Pointer to the address of the last valid sector. |
References sd_mmc_get_capacity(), and sd_mmc_test_unit_ready().
Referenced by sd_mmc_read_capacity_0(), and sd_mmc_read_capacity_1().
Ctrl_status sd_mmc_read_capacity_0 | ( | uint32_t * | u32_nb_sector | ) |
Instance Declaration for sd_mmc_read_capacity Slot O.
References sd_mmc_read_capacity().
Ctrl_status sd_mmc_read_capacity_1 | ( | uint32_t * | u32_nb_sector | ) |
Instance Declaration for sd_mmc_read_capacity Slot 1.
References sd_mmc_read_capacity().
bool sd_mmc_removal | ( | uint8_t | slot | ) |
Tells whether the memory is removable.
slot | SD/MMC Slot Card Selected. |
true
if the memory is removable, else false
. References UNUSED.
Referenced by sd_mmc_removal_0(), and sd_mmc_removal_1().
bool sd_mmc_removal_0 | ( | void | ) |
Instance Declaration for sd_mmc_removal Slot O.
References sd_mmc_removal().
bool sd_mmc_removal_1 | ( | void | ) |
Instance Declaration for sd_mmc_removal Slot 1.
References sd_mmc_removal().
Ctrl_status sd_mmc_test_unit_ready | ( | uint8_t | slot | ) |
Tests the memory state and initializes the memory if required.
The TEST UNIT READY SCSI primary command allows an application client to poll a LUN until it is ready without having to allocate memory for returned data.
This command may be used to check the media status of LUNs with removable media.
slot | SD/MMC Slot Card Selected. |
References CARD_TYPE_MMC, CARD_TYPE_SD, CTRL_BUSY, CTRL_FAIL, CTRL_GOOD, CTRL_NO_PRESENT, sd_mmc_check(), sd_mmc_ejected, SD_MMC_ERR_NO_CARD, sd_mmc_get_type(), SD_MMC_INIT_ONGOING, and SD_MMC_OK.
Referenced by sd_mmc_read_capacity(), sd_mmc_test_unit_ready_0(), and sd_mmc_test_unit_ready_1().
Ctrl_status sd_mmc_test_unit_ready_0 | ( | void | ) |
Instance Declaration for sd_mmc_test_unit_ready Slot O.
References sd_mmc_test_unit_ready().
Ctrl_status sd_mmc_test_unit_ready_1 | ( | void | ) |
Instance Declaration for sd_mmc_test_unit_ready Slot 1.
References sd_mmc_test_unit_ready().
Unload/Load the SD/MMC card selected.
The START STOP UNIT SCSI optional command allows an application client to eject the removable medium on a LUN.
slot | SD/MMC Slot Card Selected. |
unload | true to unload the medium, false to load the medium. |
true
if unload/load done success. References sd_mmc_ejected, and unload.
Referenced by sd_mmc_unload_0(), and sd_mmc_unload_1().
Instance Declaration for sd_mmc_unload Slot O.
References sd_mmc_unload().
Instance Declaration for sd_mmc_unload Slot 1.
References sd_mmc_unload().
bool sd_mmc_wr_protect | ( | uint8_t | slot | ) |
Returns the write-protection state of the memory.
slot | SD/MMC Slot Card Selected. |
true
if the memory is write-protected, else false
.References sd_mmc_is_write_protected().
Referenced by sd_mmc_wr_protect_0(), and sd_mmc_wr_protect_1().
bool sd_mmc_wr_protect_0 | ( | void | ) |
Instance Declaration for sd_mmc_wr_protect Slot O.
References sd_mmc_wr_protect().
bool sd_mmc_wr_protect_1 | ( | void | ) |
Instance Declaration for sd_mmc_wr_protect Slot 1.
References sd_mmc_wr_protect().