aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/spi.h
diff options
context:
space:
mode:
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_ */