diff options
Diffstat (limited to 'os/hal/templates/spi_lld.c')
-rw-r--r-- | os/hal/templates/spi_lld.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/os/hal/templates/spi_lld.c b/os/hal/templates/spi_lld.c index 44039d3c1..fe35ad525 100644 --- a/os/hal/templates/spi_lld.c +++ b/os/hal/templates/spi_lld.c @@ -24,7 +24,7 @@ #include "hal.h"
-#if HAL_USE_SPI || defined(__DOXYGEN__)
+#if (HAL_USE_SPI == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -37,7 +37,7 @@ /**
* @brief SPI1 driver identifier.
*/
-#if PLATFORM_SPI_USE_SPI1 || defined(__DOXYGEN__)
+#if (PLATFORM_SPI_USE_SPI1 == TRUE) || defined(__DOXYGEN__)
SPIDriver SPID1;
#endif
@@ -64,10 +64,10 @@ SPIDriver SPID1; */
void spi_lld_init(void) {
-#if PLATFORM_SPI_USE_SPI1
+#if PLATFORM_SPI_USE_SPI1 == TRUE
/* Driver initialization.*/
spiObjectInit(&SPID1);
-#endif /* PLATFORM_SPI_USE_SPI1 */
+#endif
}
/**
@@ -81,11 +81,11 @@ void spi_lld_start(SPIDriver *spip) { if (spip->state == SPI_STOP) {
/* Enables the peripheral.*/
-#if PLATFORM_SPI_USE_SPI1
+#if PLATFORM_SPI_USE_SPI1 == TRUE
if (&SPID1 == spip) {
}
-#endif /* PLATFORM_SPI_USE_SPI1 */
+#endif
}
/* Configures the peripheral.*/
@@ -102,11 +102,11 @@ void spi_lld_stop(SPIDriver *spip) { if (spip->state == SPI_READY) {
/* Disables the peripheral.*/
-#if PLATFORM_SPI_USE_SPI1
+#if PLATFORM_SPI_USE_SPI1 == TRUE
if (&SPID1 == spip) {
}
-#endif /* PLATFORM_SPI_USE_SPI1 */
+#endif
}
}
@@ -242,6 +242,6 @@ uint16_t spi_lld_polled_exchange(SPIDriver *spip, uint16_t frame) { return 0;
}
-#endif /* HAL_USE_SPI */
+#endif /* HAL_USE_SPI == TRUE */
/** @} */
|