SDIO/SD/MMC device descriptor. More...
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.
#include <sdmmc.h>
Data Fields | |
| const sdmmc_driver_t * | driver | 
| Low-level SDIO/SD/MMC peripheral driver.  More... | |
| 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.  More... | |
| sdmmc_cid_t | cid | 
| CID register of the SD/MMC Card, read during the initialization and identification procedure in the sdmmc_card_init function.  More... | |
| sdmmc_scr_t | scr | 
| SCR register of the SD Card, read during the initialization and identification procedure in the sdmmc_card_init function.  More... | |
| sdmmc_csd_t | csd | 
| CSD register of the SD/MMC Card, read during the initialization and identification procedure in the sdmmc_card_init function.  More... | |
| uint32_t | status | 
| Last SDIO/SD/MMC Card status reported in R1 response.  More... | |
| 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).  More... | |
| bool | present | 
| Indicates whether a card is present.  More... | |
| bool | init_done | 
Indicates whether the card is initialized (default false).  More... | |
| bool | s18v_support | 
Indicates whether the SDIO/SD/MMC peripheral supports the switching to 1.8V (default false).  More... | |
| bool | s18v_allowed | 
Indicates whether the card supports the switching to 1.8V (default false).  More... | |
| bool | spi_mode | 
Indicates whether SPI mode is used by the SDIO/SD/MMC device (default false).  More... | |
| 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.
| 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.
| 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.
| const sdmmc_driver_t* sdmmc_dev::driver | 
| 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.
thread_flags, event_queue or msg mechanism to inform a thread about the event, which then handles the event asynchronously in thread context. | 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.
| 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. 
| 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.
| 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.
| 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.
| 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.
| 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.