MT2523 API Reference  LinkIt SDK v4
Enum
HAL » SD

Overview

Enumerations

enum  hal_sd_status_t {
  HAL_SD_STATUS_BUSY = -2,
  HAL_SD_STATUS_ERROR = -1,
  HAL_SD_STATUS_OK = 0
}
 This enum defines the SD/eMMC API's return type. More...
 
enum  hal_sd_bus_width_t {
  HAL_SD_BUS_WIDTH_1 = 1,
  HAL_SD_BUS_WIDTH_4 = 2
}
 This enum defines the SD/eMMC bus width types. More...
 
enum  hal_sd_card_type_t {
  HAL_SD_TYPE_SD_CARD = 0,
  HAL_SD_TYPE_MMC_CARD = 1,
  HAL_SD_TYPE_SD20_LCS_CARD = 2,
  HAL_SD_TYPE_SD20_HCS_CARD = 3,
  HAL_SD_TYPE_MMC42_CARD = 4,
  HAL_SD_TYPE_CARD_TYPE_MAX = 5,
  HAL_SD_TYPE_UNKNOWN_CARD = 0xff
}
 This enum define the SD/eMMC card type. More...
 
enum  hal_sd_card_event_t {
  HAL_SD_EVENT_CARD_INSERTED = 0,
  HAL_SD_EVENT_CARD_REMOVED = 1
}
 This enum defines the card detection result event. More...
 
enum  hal_sd_callback_event_t {
  HAL_SD_EVENT_SUCCESS = 0,
  HAL_SD_EVENT_TRANSFER_ERROR = -1,
  HAL_SD_EVENT_CRC_ERROR = -2,
  HAL_SD_EVENT_DATA_TIMEOUT = -3
}
 This enum defines the card DMA transfer result event. More...
 
enum  hal_sd_port_t {
  HAL_SD_PORT_0 = 0,
  HAL_SD_PORT_1 = 1
}
 This enum defines the SD/eMMC port. More...
 

Enumeration Type Documentation

This enum defines the SD/eMMC bus width types.

Enumerator
HAL_SD_BUS_WIDTH_1 

The SD/eMMC read/write data with 1 bit bus width.

HAL_SD_BUS_WIDTH_4 

The SD/eMMC read/write data with 4 bit bus width.

This enum defines the card DMA transfer result event.

The event is passed to the user defined callback function. For more details, please refer to function hal_sd_register_callback().

Enumerator
HAL_SD_EVENT_SUCCESS 

The transaction completed without any error.

HAL_SD_EVENT_TRANSFER_ERROR 

An error occurred during transaction.

HAL_SD_EVENT_CRC_ERROR 

An CRC error occurred during transaction.

HAL_SD_EVENT_DATA_TIMEOUT 

An data timeout occurred during transaction.

This enum defines the card detection result event.

The detection event is passed to the user defined callback function. For more details, please refer to function hal_sd_register_card_detection_callback().

Enumerator
HAL_SD_EVENT_CARD_INSERTED 

An SD card is inserted.

HAL_SD_EVENT_CARD_REMOVED 

An SD card is removed.

This enum define the SD/eMMC card type.

Enumerator
HAL_SD_TYPE_MMC_CARD 

SD card.

HAL_SD_TYPE_SD20_LCS_CARD 

MMC card.

HAL_SD_TYPE_SD20_HCS_CARD 

SD 2.0 card and capacity less than 2GB.

HAL_SD_TYPE_MMC42_CARD 

SD 2.0 card and capacity larger than 2GB.

HAL_SD_TYPE_CARD_TYPE_MAX 

EMMC 4.2 and above card.

This enum defines the SD/eMMC port.

Enumerator
HAL_SD_PORT_0 

SD/eMMC port 0.

HAL_SD_PORT_1 

SD/eMMC port 1.

This enum defines the SD/eMMC API's return type.

Enumerator
HAL_SD_STATUS_BUSY 

The SD/eMMC bus is busy error occurred.

HAL_SD_STATUS_ERROR 

An error occurred and the operation failed.

HAL_SD_STATUS_OK 

No error occurred during the function call.