From ce7f7103df5f634f7b57d90e115c5824adcb68a0 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 8 Mar 2015 21:19:58 +0000 Subject: MISRA fixes for high level HAL. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7738 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/spi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/hal/include/spi.h') 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_ */ -- cgit v1.2.3