From 07bfa4cda657903906c765447616ff294620cd61 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 15 Nov 2009 09:51:25 +0000 Subject: MMC driver documentation. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1300 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/io.dox | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'os') diff --git a/os/io/io.dox b/os/io/io.dox index fde9dcf22..9f1b06d7f 100644 --- a/os/io/io.dox +++ b/os/io/io.dox @@ -256,4 +256,58 @@ * * @ingroup MII */ + +/** + * @defgroup MMC_SPI MMC over SPI Driver + * @brief Generic MMC driver. + * @details This module implements a portable MMC driver that uses a SPI + * driver as physical layer.
+ * The driver implements the following state machine: + * @dot + digraph example { + rankdir="LR"; + node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.8"]; + edge [fontname=Helvetica, fontsize=8]; + + any [label="Any State"]; + stop2 [label="MMC_STOP\nLow Power"]; + uninit [label="MMC_UNINIT", style="bold"]; + stop [label="MMC_STOP\nLow Power"]; + wait [label="MMC_WAIT\nWaiting Card"]; + inserted [label="MMC_INSERTED\nCard Inserted"]; + ready [label="MMC_READY\nCard Ready"]; + reading [label="MMC_RUNNING\nReading"]; + writing [label="MMC_RUNNING\nWriting"]; + + uninit -> stop [label="mmcObjectInit()"]; + stop -> wait [label="mmcStart()", constraint=false]; + wait -> inserted [label="Insertion"]; + inserted -> ready [label="mmcConnect()"]; + inserted -> inserted [label="mmcDisconnect()"]; + ready -> inserted [label="mmcDisconnect()"]; + ready -> reading [label="mmcStartSequentialRead()"]; + reading -> reading [label="mmcSequentialRead()"]; + reading -> ready [label="mmcStopSequentialRead()"]; + reading -> ready [label="Error"]; + ready -> writing [label="mmcStartSequentialWrite()"]; + writing -> writing [label="mmcSequentialWrite()"]; + writing -> ready [label="mmcStopSequentialWrite()"]; + writing -> ready [label="Error"]; + + inserted -> wait [label="Removal"]; + ready -> wait [label="Removal"]; + reading -> wait [label="Removal"]; + writing -> wait [label="Removal"]; + + any -> stop2 [label="mmcStop()"]; + } + * @enddot + * + * The MMC drivers currently supports only cards with capacity up to 2GB + * and does not implement CRC checking. Hot plugging and removal are supported + * through kernel events. + * + * @ingroup IO + */ + \ No newline at end of file -- cgit v1.2.3