Loading...
Searching...
No Matches

SDIO/SD/MMC device descriptor. More...

Detailed Description

SDIO/SD/MMC device descriptor.

The device descriptor holds all required information about the SDIO/SD/MMC device and the card that is used by this decive.

Note
Most of the information is determined or collected during the card initialization and identification procedure by the sdmmc_card_init function. However, some information must be determined and collected by the low-level SDIO/SD/MMC peripheral driver. These are

Definition at line 1269 of file sdmmc.h.

#include <sdmmc.h>

Data Fields

const sdmmc_driver_tdriver
 Low-level SDIO/SD/MMC peripheral driver.
 
sdmmc_event_cb_t event_cb
 The application can register an event callback function of type sdmmc_event_cb_t which is called when one of the defined events (sdmmc_event_t) is generated by the SDIO/SD/MMC driver.
 
sdmmc_cid_t cid
 CID register of the SD/MMC Card, read during the initialization and identification procedure in the sdmmc_card_init function.
 
sdmmc_scr_t scr
 SCR register of the SD Card, read during the initialization and identification procedure in the sdmmc_card_init function.
 
sdmmc_csd_t csd
 CSD register of the SD/MMC Card, read during the initialization and identification procedure in the sdmmc_card_init function.
 
uint32_t status
 Last SDIO/SD/MMC Card status reported in R1 response.
 
uint16_t rca
 Relative Card Address (RCA) of the SDIO/SD/MMC Card as determined during the initialization and identification procedure in the sdmmc_card_init function.
 
sdmmc_card_type_t type
 Type of the SDIO/SD/MMC Card as identified during the initialization and identification procedure in the sdmmc_card_init function (default SDMMC_CARD_TYPE_UNKNOWN).
 
sdmmc_bus_width_t bus_width
 Data bus width supported by the SDIO/SD/MMC device (default SDMMC_BUS_WIDTH_1BIT).
 
bool present
 Indicates whether a card is present.
 
bool init_done
 Indicates whether the card is initialized (default false).
 
bool s18v_support
 Indicates whether the SDIO/SD/MMC peripheral supports the switching to 1.8V (default false).
 
bool s18v_allowed
 Indicates whether the card supports the switching to 1.8V (default false).
 
bool spi_mode
 Indicates whether SPI mode is used by the SDIO/SD/MMC device (default false).
 

Field Documentation

◆ bus_width

sdmmc_bus_width_t sdmmc_dev::bus_width

Data bus width supported by the SDIO/SD/MMC device (default SDMMC_BUS_WIDTH_1BIT).

It has to be set by the low-level SDIO/SD/MMC peripheral driver function sdmmc_driver_t::init. It is either hard-configured for the SDIO/SD/MMC device or detected during its initialization.

Definition at line 1349 of file sdmmc.h.

◆ cid

sdmmc_cid_t sdmmc_dev::cid

CID register of the SD/MMC Card, read during the initialization and identification procedure in the sdmmc_card_init function.

It is not supported by SDIO cards and reflects the CID of the memory portion in case of Combo cards.

Definition at line 1295 of file sdmmc.h.

◆ csd

sdmmc_csd_t sdmmc_dev::csd

CSD register of the SD/MMC Card, read during the initialization and identification procedure in the sdmmc_card_init function.

It is not supported by SDIO cards. It reflects the CSD of the memory portion in case of Combo cards.

Definition at line 1311 of file sdmmc.h.

◆ driver

const sdmmc_driver_t* sdmmc_dev::driver

Low-level SDIO/SD/MMC peripheral driver.

It has to be set by the low-level SDIO/SD/MMC driver during the initialization.

Definition at line 1274 of file sdmmc.h.

◆ event_cb

sdmmc_event_cb_t sdmmc_dev::event_cb

The application can register an event callback function of type sdmmc_event_cb_t which is called when one of the defined events (sdmmc_event_t) is generated by the SDIO/SD/MMC driver.

Warning
The function is called in the ISR context. Do not do anything comprehensive or time-consuming. Instead, use thread_flags, event_queue or msg mechanism to inform a thread about the event, which then handles the event asynchronously in thread context.

Definition at line 1287 of file sdmmc.h.

◆ init_done

bool sdmmc_dev::init_done

Indicates whether the card is initialized (default false).

It is set by the initialization and identification procedure in function sdmmc_card_init.

Definition at line 1365 of file sdmmc.h.

◆ present

bool sdmmc_dev::present

Indicates whether a card is present.

It has to be set by the low-level SDIO/SD/MMC peripheral driver in function sdmmc_driver_t::init and if the card is removed or inserted. Either the CD signal is used if available, or it must be set to true by default.

Definition at line 1358 of file sdmmc.h.

◆ rca

uint16_t sdmmc_dev::rca

Relative Card Address (RCA) of the SDIO/SD/MMC Card as determined during the initialization and identification procedure in the sdmmc_card_init function.

Definition at line 1333 of file sdmmc.h.

◆ s18v_allowed

bool sdmmc_dev::s18v_allowed

Indicates whether the card supports the switching to 1.8V (default false).

It is set during the initialization and identification procedure in function sdmmc_card_init.

Definition at line 1379 of file sdmmc.h.

◆ s18v_support

bool sdmmc_dev::s18v_support

Indicates whether the SDIO/SD/MMC peripheral supports the switching to 1.8V (default false).

It has to be set by the low-level SDIO/SD/MMC peripheral driver function sdmmc_driver_t::init if supported.

Definition at line 1372 of file sdmmc.h.

◆ scr

sdmmc_scr_t sdmmc_dev::scr

SCR register of the SD Card, read during the initialization and identification procedure in the sdmmc_card_init function.

It is not supported by SDIO and MMC cards. It reflects the SCR of the memory portion in case of Combo cards.

Definition at line 1303 of file sdmmc.h.

◆ spi_mode

bool sdmmc_dev::spi_mode

Indicates whether SPI mode is used by the SDIO/SD/MMC device (default false).

It has to be set by the low-level SDIO/SD/MMC peripheral driver function sdmmc_driver_t::init.

Definition at line 1386 of file sdmmc.h.

◆ status

uint32_t sdmmc_dev::status

Last SDIO/SD/MMC Card status reported in R1 response.

It is set by the low-level SDIO/SD/MMC peripheral driver function sdmmc_driver_t::send_cmd.

Definition at line 1326 of file sdmmc.h.

◆ type

sdmmc_card_type_t sdmmc_dev::type

Type of the SDIO/SD/MMC Card as identified during the initialization and identification procedure in the sdmmc_card_init function (default SDMMC_CARD_TYPE_UNKNOWN).

Definition at line 1340 of file sdmmc.h.


The documentation for this struct was generated from the following file: