SD/MMC Driver Overview

This is a driver for interfacing SD and MMC cards. It provides an asynchronous interface against the application level.

The following diagram is a high-level overview of the SD/MMC driver. The "SD/MMC block device" implements the standard block_device interface. The "SD/MMC request interface" is the external interface, and it's conforming to the asynchronous interface design (see Asynchronous Request Architecture). The "SD/MMC probe engine" is a task running in a workqueue probing for presense of cards.

inline_dotgraph_1.dot

SD/MMC init

The SD/MMC driver needs to be initialized before use and this is done with the following function. This function will return a sdmmc_host structure.

SD/MMC card probing

sdmmc_host contains one or two sdmmc_slot depending on the configuration. And the following funtion starts a probe task for the specified slot. This function takes slot, workqueue to use and callback for events as arguments.

SD/MMC request management

For general introduction to asynchronous request management see Async-architecture.

A sdmmc_request contains parts of the typical data for a communication sequence against a SD or MMC card. One of the field is required and that is the command (sdmmc_request::cmd). Other optional fields are:


Generated on Tue Sep 15 10:22:14 2009 for libavr32 by  doxygen 1.5.8