37 #ifndef SD_MMC_H_INCLUDED    38 #define SD_MMC_H_INCLUDED    67 #define SD_MMC_INIT_ONGOING     1        68 #define SD_MMC_ERR_NO_CARD      2        69 #define SD_MMC_ERR_UNUSABLE     3        70 #define SD_MMC_ERR_SLOT         4        71 #define SD_MMC_ERR_COMM         5        72 #define SD_MMC_ERR_PARAM        6        73 #define SD_MMC_ERR_WP           7        80 #define CARD_TYPE_UNKNOWN   (0)          81 #define CARD_TYPE_SD        (1 << 0)     82 #define CARD_TYPE_MMC       (1 << 1)     83 #define CARD_TYPE_SDIO      (1 << 2)     84 #define CARD_TYPE_HC        (1 << 3)     85 #define CARD_TYPE_SD_COMBO  (CARD_TYPE_SD | CARD_TYPE_SDIO)    93 #define CARD_VER_UNKNOWN   (0)           94 #define CARD_VER_SD_1_0    (0x10)        95 #define CARD_VER_SD_1_10   (0x1A)        96 #define CARD_VER_SD_2_0    (0X20)        97 #define CARD_VER_SD_3_0    (0X30)        98 #define CARD_VER_MMC_1_2   (0x12)        99 #define CARD_VER_MMC_1_4   (0x14)       100 #define CARD_VER_MMC_2_2   (0x22)       101 #define CARD_VER_MMC_3     (0x30)       102 #define CARD_VER_MMC_4     (0x40)       105 #define SD_MMC_BLOCK_SIZE          512   234 #ifdef SDIO_SUPPORT_ENABLE   246 sd_mmc_err_t sdio_read_direct(uint8_t slot, uint8_t func_num, uint32_t addr,
   259 sd_mmc_err_t sdio_write_direct(uint8_t slot, uint8_t func_num, uint32_t addr,
   276 sd_mmc_err_t sdio_read_extended(uint8_t slot, uint8_t func_num, uint32_t addr,
   277                 uint8_t inc_addr, uint8_t *dest, uint16_t size);
   293 sd_mmc_err_t sdio_write_extended(uint8_t slot, uint8_t func_num, uint32_t addr,
   294                 uint8_t inc_addr, uint8_t *src, uint16_t size);
   295 #endif // SDIO_SUPPORT_ENABLE bool sd_mmc_is_write_protected(uint8_t slot)
Get the card write protection status. 
 
sd_mmc_err_t sd_mmc_wait_end_of_read_blocks(bool abort)
Wait the end of read blocks of data from the card. 
 
sd_mmc_err_t sd_mmc_wait_end_of_write_blocks(bool abort)
Wait the end of write blocks of data. 
 
uint8_t card_version_t
Type of card version. 
 
uint32_t sd_mmc_get_capacity(uint8_t slot)
Get the memory capacity. 
 
uint8_t sd_mmc_nb_slot(void)
Return the number of slot available. 
 
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. 
 
sd_mmc_err_t sd_mmc_start_write_blocks(const void *src, uint16_t nb_block)
Start the write blocks of data. 
 
card_type_t sd_mmc_get_type(uint8_t slot)
Get the card type. 
 
Commonly used includes, types and macros. 
 
void sd_mmc_init(void)
Initialize the SD/MMC stack and low level driver required. 
 
sd_mmc_err_t sd_mmc_check(uint8_t slot)
Performs a card checks. 
 
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. 
 
card_version_t sd_mmc_get_version(uint8_t slot)
Get the card version. 
 
USBInterfaceDescriptor data
 
SD/MMC stack configuration file. 
 
uint8_t card_type_t
Type of card type. 
 
sd_mmc_err_t sd_mmc_start_read_blocks(void *dest, uint16_t nb_block)
Start the read blocks of data from the card. 
 
uint8_t sd_mmc_err_t
Type of return error code.