aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/sdc.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/include/sdc.h')
-rw-r--r--os/hal/include/sdc.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/os/hal/include/sdc.h b/os/hal/include/sdc.h
index afc3a6aba..466c48fa6 100644
--- a/os/hal/include/sdc.h
+++ b/os/hal/include/sdc.h
@@ -42,11 +42,16 @@
*/
#define SDC_CMD8_PATTERN 0x000001AA
+/**
+ * @name SD cart types
+ * @{
+ */
#define SDC_MODE_CARDTYPE_MASK 0xF /**< @brief Card type mask. */
#define SDC_MODE_CARDTYPE_SDV11 0 /**< @brief Card is SD V1.1.*/
#define SDC_MODE_CARDTYPE_SDV20 1 /**< @brief Card is SD V2.0.*/
#define SDC_MODE_CARDTYPE_MMC 2 /**< @brief Card is MMC. */
#define SDC_MODE_HIGH_CAPACITY 0x10 /**< @brief High cap.card. */
+/** @} */
/**
* @brief Mask of error bits in R1 responses.
@@ -88,6 +93,10 @@
/*===========================================================================*/
/**
+ * @name SDC configuration options
+ * @{
+ */
+/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intevals.
*/
@@ -113,6 +122,7 @@
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
+/** @} */
/*===========================================================================*/
/* Derived constants and error checks. */
@@ -143,6 +153,10 @@ typedef enum {
/*===========================================================================*/
/**
+ * @name R1 response utilities
+ * @{
+ */
+/**
* @brief Evaluates to @p TRUE if the R1 response contains error flags.
*
* @param[in] r1 the r1 response
@@ -162,8 +176,13 @@ typedef enum {
* @param[in] r1 the r1 response
*/
#define SDC_R1_IS_CARD_LOCKED(r1) (((r1) >> 21) & 1)
+/** @} */
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Returns the driver state.
*
* @param[in] sdcp pointer to the @p SDCDriver object
@@ -204,6 +223,7 @@ typedef enum {
* @api
*/
#define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp))
+/** @} */
/*===========================================================================*/
/* External declarations. */