diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-08 21:19:58 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-08 21:19:58 +0000 |
commit | ce7f7103df5f634f7b57d90e115c5824adcb68a0 (patch) | |
tree | 48064ba690d7002bb8fc7b78f3f9dd76729b785c /os/hal/include/sdc.h | |
parent | 63bf265ddf9ad40ad981c5a145c601972b91426e (diff) | |
download | ChibiOS-ce7f7103df5f634f7b57d90e115c5824adcb68a0.tar.gz ChibiOS-ce7f7103df5f634f7b57d90e115c5824adcb68a0.tar.bz2 ChibiOS-ce7f7103df5f634f7b57d90e115c5824adcb68a0.zip |
MISRA fixes for high level HAL.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7738 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/sdc.h')
-rw-r--r-- | os/hal/include/sdc.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/os/hal/include/sdc.h b/os/hal/include/sdc.h index ebeb1ea88..d99a6f8a8 100644 --- a/os/hal/include/sdc.h +++ b/os/hal/include/sdc.h @@ -28,7 +28,7 @@ #ifndef _SDC_H_
#define _SDC_H_
-#if HAL_USE_SDC || defined(__DOXYGEN__)
+#if (HAL_USE_SDC == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
@@ -38,27 +38,27 @@ * @name SD card types
* @{
*/
-#define SDC_MODE_CARDTYPE_MASK 0xF /**< @brief Card type mask. */
-#define SDC_MODE_CARDTYPE_SDV11 0
-#define SDC_MODE_CARDTYPE_SDV20 1
-#define SDC_MODE_CARDTYPE_MMC 2
-#define SDC_MODE_HIGH_CAPACITY 0x10
+#define SDC_MODE_CARDTYPE_MASK 0xFU
+#define SDC_MODE_CARDTYPE_SDV11 0U
+#define SDC_MODE_CARDTYPE_SDV20 1U
+#define SDC_MODE_CARDTYPE_MMC 2U
+#define SDC_MODE_HIGH_CAPACITY 0x10U
/** @} */
/**
* @name SDC bus error conditions
* @{
*/
-#define SDC_NO_ERROR 0
-#define SDC_CMD_CRC_ERROR 1
-#define SDC_DATA_CRC_ERROR 2
-#define SDC_DATA_TIMEOUT 4
-#define SDC_COMMAND_TIMEOUT 8
-#define SDC_TX_UNDERRUN 16
-#define SDC_RX_OVERRUN 32
-#define SDC_STARTBIT_ERROR 64
-#define SDC_OVERFLOW_ERROR 128
-#define SDC_UNHANDLED_ERROR 0xFFFFFFFF
+#define SDC_NO_ERROR 0U
+#define SDC_CMD_CRC_ERROR 1U
+#define SDC_DATA_CRC_ERROR 2U
+#define SDC_DATA_TIMEOUT 4U
+#define SDC_COMMAND_TIMEOUT 8U
+#define SDC_TX_UNDERRUN 16U
+#define SDC_RX_OVERRUN 32U
+#define SDC_STARTBIT_ERROR 64U
+#define SDC_OVERFLOW_ERROR 128U
+#define SDC_UNHANDLED_ERROR 0xFFFFFFFFU
/** @} */
/*===========================================================================*/
@@ -119,7 +119,7 @@ typedef enum { */
typedef enum {
SDC_CLK_25MHz = 0,
- SDC_CLK_50MHz,
+ SDC_CLK_50MHz
} sdcbusclk_t;
#include "sdc_lld.h"
@@ -179,9 +179,9 @@ extern "C" { bool sdcConnect(SDCDriver *sdcp);
bool sdcDisconnect(SDCDriver *sdcp);
bool sdcRead(SDCDriver *sdcp, uint32_t startblk,
- uint8_t *buffer, uint32_t n);
+ uint8_t *buf, uint32_t n);
bool sdcWrite(SDCDriver *sdcp, uint32_t startblk,
- const uint8_t *buffer, uint32_t n);
+ const uint8_t *buf, uint32_t n);
sdcflags_t sdcGetAndClearErrors(SDCDriver *sdcp);
bool sdcSync(SDCDriver *sdcp);
bool sdcGetInfo(SDCDriver *sdcp, BlockDeviceInfo *bdip);
@@ -190,7 +190,7 @@ extern "C" { }
#endif
-#endif /* HAL_USE_SDC */
+#endif /* HAL_USE_SDC == TRUE */
#endif /* _SDC_H_ */
|