aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-09 19:30:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-09 19:30:55 +0000
commitf91dff51cc155f265a65417087f3402e99f6e5ae (patch)
treecdb44696001398415156aaf6c261b09d4231d4f9 /os/hal/include
parent539fc8bfc35d0d03c46d553d21c8f332f4a9eb55 (diff)
downloadChibiOS-f91dff51cc155f265a65417087f3402e99f6e5ae.tar.gz
ChibiOS-f91dff51cc155f265a65417087f3402e99f6e5ae.tar.bz2
ChibiOS-f91dff51cc155f265a65417087f3402e99f6e5ae.zip
Added SDC status check to sdcWrite();
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2945 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/sdc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/os/hal/include/sdc.h b/os/hal/include/sdc.h
index 56ee267e1..7c505a170 100644
--- a/os/hal/include/sdc.h
+++ b/os/hal/include/sdc.h
@@ -45,6 +45,7 @@
#define SDC_CMD_SEND_IF_COND 8
#define SDC_CMD_SEND_CSD 9
#define SDC_CMD_STOP_TRANSMISSION 12
+#define SDC_CMD_SEND_STATUS 13
#define SDC_CMD_SET_BLOCKLEN 16
#define SDC_CMD_READ_MULTIPLE_BLOCK 18
#define SDC_CMD_SET_BLOCK_COUNT 23
@@ -58,6 +59,17 @@
#define SDC_MODE_CARDTYPE_MMC 2 /**< Card is MMC compliant. */
#define SDC_MODE_HIGH_CAPACITY 0x10 /**< High capacity card. */
+#define SDC_STS(r1) (((r1) >> 9) & 15)
+#define SDC_STS_IDLE 0
+#define SDC_STS_READY 1
+#define SDC_STS_IDENT 2
+#define SDC_STS_STBY 3
+#define SDC_STS_TRAN 4
+#define SDC_STS_DATA 5
+#define SDC_STS_RCV 6
+#define SDC_STS_PRG 7
+#define SDC_STS_DIS 8
+
#define SDC_CMD8_PATTERN 0x000001AA
#define SDC_ACMD41_RETRY 100