diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-02-25 11:58:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-02-25 11:58:40 +0000 |
commit | cced334724aec1f39d683adcda6984543095ba8c (patch) | |
tree | b2b40c6c276399e2136228840985ca52145d5cac /os/hal/include/mmcsd.h | |
parent | 9afc25656cf245314157c310847f100acb54597a (diff) | |
download | ChibiOS-cced334724aec1f39d683adcda6984543095ba8c.tar.gz ChibiOS-cced334724aec1f39d683adcda6984543095ba8c.tar.bz2 ChibiOS-cced334724aec1f39d683adcda6984543095ba8c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5318 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/mmcsd.h')
-rw-r--r-- | os/hal/include/mmcsd.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/os/hal/include/mmcsd.h b/os/hal/include/mmcsd.h index c782ab7a2..5ff3082c7 100644 --- a/os/hal/include/mmcsd.h +++ b/os/hal/include/mmcsd.h @@ -219,6 +219,32 @@ typedef struct { /*===========================================================================*/
/**
+ * @name R1 response utilities
+ * @{
+ */
+/**
+ * @brief Evaluates to @p TRUE if the R1 response contains error flags.
+ *
+ * @param[in] r1 the r1 response
+ */
+#define MMCSD_R1_ERROR(r1) (((r1) & MMCSD_R1_ERROR_MASK) != 0)
+
+/**
+ * @brief Returns the status field of an R1 response.
+ *
+ * @param[in] r1 the r1 response
+ */
+#define MMCSD_R1_STS(r1) (((r1) >> 9) & 15)
+
+/**
+ * @brief Evaluates to @p TRUE if the R1 response indicates a locked card.
+ *
+ * @param[in] r1 the r1 response
+ */
+#define MMCSD_R1_IS_CARD_LOCKED(r1) (((r1) >> 21) & 1)
+/** @} */
+
+/**
* @name Macro Functions
* @{
*/
|