From 21c928e6e5241a836baa1b26a7e74407cd66b1d2 Mon Sep 17 00:00:00 2001 From: winneymj Date: Sat, 15 Aug 2020 08:02:49 -0500 Subject: [PATCH] Fix detection of enabled SPIM --- targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h index a1d900d972..fcca92a530 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h @@ -43,9 +43,9 @@ #include "PortNames.h" #include "PeripheralNames.h" #include "PinNames.h" -#if NRFX_SPIM_ENABLED == 1 || defined(DEVICE_SPIM) +#if NRFX_SPIM_ENABLED || defined(DEVICE_SPIM) #include "nrfx_spim.h" -#elif NRFX_SPI_ENABLED == 1 || defined(DEVICE_SPI) +#elif NRFX_SPI_ENABLED || defined(DEVICE_SPI) #include "nrfx_spi.h" #endif #include "nrf_twi.h" @@ -94,9 +94,9 @@ struct serial_s { struct spi_s { int instance; PinName cs; -#if NRFX_SPIM_ENABLED == 1 || defined(DEVICE_SPIM) +#if NRFX_SPIM_ENABLED || defined(DEVICE_SPIM) nrfx_spim_config_t config; -#elif NRFX_SPI_ENABLED == 1 || defined(DEVICE_SPI) +#elif NRFX_SPI_ENABLED || defined(DEVICE_SPI) nrfx_spi_config_t config; #endif bool update;