mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Add MMC configuration logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2255 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+393
-64
File diff suppressed because it is too large
Load Diff
@@ -103,7 +103,7 @@
|
||||
# define MMCSD_R1_STATE_DIS (8 << MMCSD_R1_STATE_SHIFT) /* 8=Disconnect state */
|
||||
#define MMCSD_R1_READYFORDATA (1 << 8) /* Buffer empty */
|
||||
#define MMCSD_R1_APPCMD (1 << 5) /* Next CMD is ACMD */
|
||||
#define MMCSD_R1_AKESEQERROR (1 << 3) /* Authentication error */
|
||||
#define MMCSD_R1_AKESEQERROR (1 << 3) /* Authentication error */
|
||||
#define MMCSD_R1_ERRORMASK 0xfdffe008 /* Error mask */
|
||||
|
||||
#define IS_STATE(v,s) (((v)&MMCSD_R1_CURRENTSTATE_MASK)==(s))
|
||||
@@ -153,6 +153,25 @@
|
||||
/********************************************************************************************
|
||||
* Public Types
|
||||
********************************************************************************************/
|
||||
|
||||
/* Decoded CID register */
|
||||
|
||||
struct mmcsd_cid_s
|
||||
{
|
||||
ubyte mid; /* 127:120 8-bit Manufacturer ID */
|
||||
uint16 oid; /* 119:104 16-bit OEM/Application ID (ascii) */
|
||||
ubyte pnm[6]; /* 103:64 40-bit Product Name (ascii) + null terminator */
|
||||
ubyte prv; /* 63:56 8-bit Product revision */
|
||||
uint32 psn; /* 55:24 32-bit Product serial number */
|
||||
/* 23:20 4-bit (reserved) */
|
||||
uint16 mdt; /* 19:8 12-bit Manufacturing date */
|
||||
ubyte crc; /* 7:1 7-bit CRC7 */
|
||||
/* 0:0 1-bit (not used) */
|
||||
};
|
||||
|
||||
/********************************************************************************************
|
||||
* Public Data
|
||||
********************************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
||||
@@ -712,10 +712,8 @@ enum sdio_clock_e
|
||||
{
|
||||
CLOCK_SDIO_DISABLED = 0, /* Clock is disabled */
|
||||
CLOCK_IDMODE, /* Initial ID mode clocking (<400KHz) */
|
||||
CLOCK_MMC_SLOW, /* MMC initialization clocking */
|
||||
CLOCK_SD_SLOW, /* SD initialization clocking */
|
||||
CLOCK_MMC_FAST, /* MMC normal operation clocking */
|
||||
CLOCK_SD_FAST /* SD normal operation clocking */
|
||||
CLOCK_MMC_TRANSFER, /* MMC normal operation clocking */
|
||||
CLOCK_SD_TRANSFER /* SD normal operation clocking */
|
||||
};
|
||||
|
||||
/* This structure defines the interface between the NuttX MMC/SD
|
||||
|
||||
Reference in New Issue
Block a user