39 #if (SD_MMC_0_MEM == ENABLE) || (SD_MMC_1_MEM == ENABLE) 160 #if ACCESS_USB == true 168 COMPILER_WORD_ALIGNED
171 COMPILER_WORD_ALIGNED
176 bool b_first_step =
true;
188 nb_step = nb_sector + 1;
199 if (!udi_msc_trans_block(
true,
200 ((nb_step % 2) == 0) ?
210 b_first_step =
false;
217 b_first_step =
false;
234 bool b_first_step =
true;
246 nb_step = nb_sector + 1;
257 if (!udi_msc_trans_block(
false,
258 ((nb_step % 2) == 0) ?
273 b_first_step =
false;
289 #endif // ACCESS_USB == true 292 #if ACCESS_MEM_TO_RAM == true 357 #endif // ACCESS_MEM_TO_RAM == true 359 #endif // SD_MMC_0_MEM == ENABLE || SD_MMC_1_MEM == ENABLE Ctrl_status sd_mmc_test_unit_ready_0(void)
Instance Declaration for sd_mmc_test_unit_ready Slot O.
#define UNUSED(v)
Marking v as a unused parameter or value.
Ctrl_status sd_mmc_mem_2_ram(uint8_t slot, uint32_t addr, void *ram)
Copies 1 data sector from the memory to RAM.
Ctrl_status sd_mmc_ram_2_mem(uint8_t slot, uint32_t addr, const void *ram)
Copies 1 data sector from RAM to the memory.
bool sd_mmc_removal_0(void)
Instance Declaration for sd_mmc_removal Slot O.
bool sd_mmc_removal(uint8_t slot)
Tells whether the memory is removable.
bool sd_mmc_unload_0(bool unload)
Instance Declaration for sd_mmc_unload Slot O.
sd_mmc_err_t sd_mmc_init_write_blocks(uint8_t slot, uint32_t start, uint16_t nb_block)
Initialize the write blocks of data.
Ctrl_status sd_mmc_read_capacity(uint8_t slot, uint32_t *nb_sector)
Returns the address of the last valid sector in the memory.
Ctrl_status sd_mmc_test_unit_ready(uint8_t slot)
Tests the memory state and initializes the memory if required.
#define SD_MMC_ERR_NO_CARD
Ctrl_status sd_mmc_mem_2_ram_1(uint32_t addr, void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot 1.
Ctrl_status sd_mmc_usb_write_10_0(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_write_10 Slot O.
Ctrl_status sd_mmc_ram_2_mem_1(uint32_t addr, const void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot 1.
Memory not initialized or changed.
sd_mmc_err_t sd_mmc_wait_end_of_write_blocks(bool abort)
Wait the end of write blocks of data.
COMPILER_WORD_ALIGNED uint8_t sector_buf_1[SD_MMC_BLOCK_SIZE]
sd_mmc_err_t sd_mmc_check(uint8_t slot)
Performs a card checks.
#define SD_MMC_BLOCK_SIZE
This SD MMC stack uses the maximum block size autorized (512 bytes)
static bool sd_mmc_ejected[2]
Ctrl_status sd_mmc_read_capacity_1(uint32_t *nb_sector)
Instance Declaration for sd_mmc_read_capacity Slot 1.
sd_mmc_err_t sd_mmc_start_read_blocks(void *dest, uint16_t nb_block)
Start the read blocks of data from the card.
Ctrl_status sd_mmc_read_capacity_0(uint32_t *nb_sector)
Instance Declaration for sd_mmc_read_capacity Slot O.
card_type_t sd_mmc_get_type(uint8_t slot)
Get the card type.
bool sd_mmc_wr_protect(uint8_t slot)
Returns the write-protection state of the memory.
Ctrl_status sd_mmc_usb_write_10(uint8_t slot, uint32_t addr, uint16_t nb_sector)
Transfers data from USB to the memory.
Ctrl_status sd_mmc_usb_read_10(uint8_t slot, uint32_t addr, uint16_t nb_sector)
Transfers data from the memory to USB.
bool sd_mmc_unload_1(bool unload)
Instance Declaration for sd_mmc_unload Slot 1.
#define CARD_TYPE_MMC
MMC card.
bool sd_mmc_wr_protect_0(void)
Instance Declaration for sd_mmc_wr_protect Slot O.
bool sd_mmc_wr_protect_1(void)
Instance Declaration for sd_mmc_wr_protect Slot 1.
#define CARD_TYPE_SD
SD card.
Ctrl_status
Status returned by CTRL_ACCESS interfaces.
SD/MMC stack configuration file.
sd_mmc_err_t sd_mmc_init_read_blocks(uint8_t slot, uint32_t start, uint16_t nb_block)
Initialize the read blocks of data from the card.
Common SD/MMC stack header file.
COMPILER_WORD_ALIGNED uint8_t sector_buf_0[SD_MMC_BLOCK_SIZE]
Ctrl_status sd_mmc_usb_write_10_1(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_write_10 Slot 1.
Ctrl_status sd_mmc_usb_read_10_1(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_read_10 Slot 1.
Ctrl_status sd_mmc_mem_2_ram_0(uint32_t addr, void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot O.
sd_mmc_err_t sd_mmc_start_write_blocks(const void *src, uint16_t nb_block)
Start the write blocks of data.
uint32_t sd_mmc_get_capacity(uint8_t slot)
Get the memory capacity.
Ctrl_status sd_mmc_test_unit_ready_1(void)
Instance Declaration for sd_mmc_test_unit_ready Slot 1.
Ctrl_status sd_mmc_usb_read_10_0(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_read_10 Slot O.
bool sd_mmc_unload(uint8_t slot, bool unload)
Unload/Load the SD/MMC card selected.
CTRL_ACCESS interface for common SD/MMC stack.
bool sd_mmc_removal_1(void)
Instance Declaration for sd_mmc_removal Slot 1.
sd_mmc_err_t sd_mmc_wait_end_of_read_blocks(bool abort)
Wait the end of read blocks of data from the card.
Ctrl_status sd_mmc_ram_2_mem_0(uint32_t addr, const void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot O.
#define SD_MMC_INIT_ONGOING
bool sd_mmc_is_write_protected(uint8_t slot)
Get the card write protection status.