diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-05-29 16:19:21 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-05-29 16:19:21 +0000 |
commit | 9b9bd471edae25a3ec4771485329f7ce6734c3ed (patch) | |
tree | c85c99ab7fb034cee1fe110e001b4953a6018c55 /os/hal/include | |
parent | 88e92b3fc3a14ec04780815b1061e680dfbb9777 (diff) | |
download | ChibiOS-9b9bd471edae25a3ec4771485329f7ce6734c3ed.tar.gz ChibiOS-9b9bd471edae25a3ec4771485329f7ce6734c3ed.tar.bz2 ChibiOS-9b9bd471edae25a3ec4771485329f7ce6734c3ed.zip |
Enhancements to the SDC driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3002 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/sdc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/os/hal/include/sdc.h b/os/hal/include/sdc.h index 2c35b8a0e..3f0634fc5 100644 --- a/os/hal/include/sdc.h +++ b/os/hal/include/sdc.h @@ -163,6 +163,32 @@ typedef enum { */
#define SDC_R1_IS_CARD_LOCKED(r1) (((r1) >> 21) & 1)
+/**
+ * @brief Returns the driver state.
+ *
+ * @param[in] sdcp pointer to the @p SDCDriver object
+ * @return The driver state.
+ *
+ * @api
+ */
+#define sdcGetDriverState(sdcp) ((sdcp)->state)
+
+/**
+ * @brief Returns the write protect status.
+ * @note This macro wraps a low level function named
+ * @p sdc_lld_is_write_protected(), this function must be
+ * provided by the application because it is not part of the
+ * SDC driver.
+ *
+ * @param[in] sdcp pointer to the @p SDCDriver object
+ * @return The card state.
+ * @retval FALSE card not inserted.
+ * @retval TRUE card inserted.
+ *
+ * @api
+ */
+#define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp))
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
|