Multimedia card interface registers.
More...
Detailed Description
Multimedia card interface registers.
Multimedia Card Interface.
This simple implementation supports reading a single 3.3V MultiMedia Card in slot A or B only.
*
* $Log$
* Revision 1.3 2008/10/03 11:28:58 haraldkipp
* Corrected and modified initialization of MultiMedia and SD Cards.
*
* Revision 1.2 2008/08/11 06:59:04 haraldkipp
* BSD types replaced by stdint types (feature request #1282721).
*
* Revision 1.1 2006/09/05 12:34:21 haraldkipp
* Support for hardware MultiMedia Card interface added.
* SD Cards are currently not supported.
*
*
*
Define Documentation
| #define MMC_BLOCK_SIZE 512 |
| #define MCI_INI_BITRATE 400000 |
| #define MCI_MMC_BITRATE 20000000 |
| #define MCI_SDC_BITRATE 25000000 |
| #define MMCARD_VRANGE (MMCARD_32_33V | MMCARD_31_32V | MMCARD_30_31V) |
| #define MMC_PINS_A _BV(PA8_MCCK_A) |
| #define MMC_PINS_B _BV(PA1_MCCDB_B) | _BV(PA0_MCDB0_B) | _BV(PA5_MCDB1_B) | _BV(PA4_MCDB2_B) | _BV(PA3_MCDB3_B) |
| #define MCICMD_ALL_SEND_CID (MMCMD_ALL_SEND_CID | MCI_MAXLAT | MCI_RSPTYP_136) |
| #define MCICMD_DESELECT_CARD (MMCMD_SELECT_CARD) |
| #define MCICMD_GO_IDLE_STATE (MMCMD_GO_IDLE_STATE) |
| #define MCICMD_READ_SINGLE_BLOCK (MMCMD_READ_SINGLE_BLOCK | MCI_TRCMD_START | MCI_TRDIR | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SELECT_CARD (MMCMD_SELECT_CARD | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SEND_APP_CMD (MMCMD_SEND_APP_CMD | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SEND_APP_OP_COND (MMCMD_SEND_APP_OP_COND | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SEND_OP_COND (MMCMD_SEND_OP_COND | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SEND_RELATIVE_ADDR (MMCMD_SEND_RELATIVE_ADDR | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SEND_STATUS (MMCMD_SEND_STATUS | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_SET_BLOCKLEN (MMCMD_SET_BLOCKLEN | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_WRITE_BLOCK (MMCMD_WRITE_BLOCK | MCI_TRCMD_START | MCI_MAXLAT | MCI_RSPTYP_48) |
| #define MCICMD_IERROR (MCI_RTOE | MCI_RENDE | MCI_RDIRE | MCI_RINDE) |
| #define MCICMD_ERROR (MCI_UNRE | MCI_OVRE | MCI_DTOE | MCI_DCRCE | MCI_RCRCE | MCICMD_IERROR) |
| #define MCIFLG_SDCARD 0x00000001 |
| #define MCIFLG_4BIT 0x00000010 |
Typedef Documentation
Local card interface information.
Local multimedia card mount information.
Variable Documentation
Initial value: {
0,
{'M', 'C', 'I', '0', 0, 0, 0, 0, 0}
,
0,
0,
0,
&mci0_info,
0,
At91MciInit,
At91MciIOCtrl,
At91MciBlockRead,
At91MciBlockWrite,
At91MciMount,
At91MciUnmount,
0
}
Multimedia card device information structure.
A pointer to this structure must be passed to NutRegisterDevice() to bind this driver to the Nut/OS kernel. An application may then call /verbatim _open("MCI0:", _O_RDWR | _O_BINARY); /endverbatim to mount the first active primary partition with any previously registered file system driver (typically devPhat0).