#ifndef _SD_MMC_H_ #define _SD_MMC_H_ #include "atmel_start.h" typedef enum sd_mmc_mode_t { SD_MMC_MODE_SPI = 0, SD_MMC_MODE_MCI = 1 }sd_mmc_mode_t; typedef enum sd_mmc_err_t { SD_MMC_SUCCESS = 0, SD_MMC_FAIL = 1, SD_MMC_INIT_ONGOING = 2, SD_MMC_ERR_NO_CARD = 3, SD_MMC_ERR_UNUSABLE = 4, SD_MMC_ERR_SLOT = 5, SD_MMC_ERR_COMM = 6, SD_MMC_ERR_PARAM = 7, SD_MMC_ERR_WP = 8 } sd_mmc_err_t; sd_mmc_err_t sd_mmc_init(void); sd_mmc_err_t sd_mmc_select(uint8_t slot, uint32_t clock, uint8_t bus_width, bool high_speed); sd_mmc_err_t sd_mmc_send_command(uint8_t command, uint32_t arg, uint8_t crc); sd_mmc_err_t sd_mmc_read_res1(void); #endif