aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/spi.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-08 21:19:58 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-08 21:19:58 +0000
commitce7f7103df5f634f7b57d90e115c5824adcb68a0 (patch)
tree48064ba690d7002bb8fc7b78f3f9dd76729b785c /os/hal/include/spi.h
parent63bf265ddf9ad40ad981c5a145c601972b91426e (diff)
downloadChibiOS-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/spi.h')
-rw-r--r--os/hal/include/spi.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/os/hal/include/spi.h b/os/hal/include/spi.h
index b4aa43e41..265ed32c3 100644
--- a/os/hal/include/spi.h
+++ b/os/hal/include/spi.h
@@ -28,7 +28,7 @@
#ifndef _SPI_H_
#define _SPI_H_
-#if HAL_USE_SPI || defined(__DOXYGEN__)
+#if (HAL_USE_SPI == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
@@ -211,7 +211,7 @@ typedef enum {
* @name Low level driver helper macros
* @{
*/
-#if SPI_USE_WAIT || defined(__DOXYGEN__)
+#if (SPI_USE_WAIT == TRUE) || defined(__DOXYGEN__)
/**
* @brief Waits for operation completion.
* @details This function waits for the driver to complete the current
@@ -224,7 +224,7 @@ typedef enum {
*
* @notapi
*/
-#define _spi_wait_s(spip) osalThreadSuspendS(&(spip)->thread)
+#define _spi_wait_s(spip) (void) osalThreadSuspendS(&(spip)->thread)
/**
* @brief Wakes up the waiting thread.
@@ -293,16 +293,16 @@ extern "C" {
void spiExchange(SPIDriver *spip, size_t n, const void *txbuf, void *rxbuf);
void spiSend(SPIDriver *spip, size_t n, const void *txbuf);
void spiReceive(SPIDriver *spip, size_t n, void *rxbuf);
-#endif /* SPI_USE_WAIT */
+#endif
#if SPI_USE_MUTUAL_EXCLUSION
void spiAcquireBus(SPIDriver *spip);
void spiReleaseBus(SPIDriver *spip);
-#endif /* SPI_USE_MUTUAL_EXCLUSION */
+#endif
#ifdef __cplusplus
}
#endif
-#endif /* HAL_USE_SPI */
+#endif /* HAL_USE_SPI == TRUE */
#endif /* _SPI_H_ */