Skip to content

Commit 6dbeece

Browse files
committed
Fix detection of enabled SPIM
1 parent 5249a9a commit 6dbeece

File tree

1 file changed

+4
-4
lines changed
  • targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52

1 file changed

+4
-4
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
#include "PortNames.h"
4444
#include "PeripheralNames.h"
4545
#include "PinNames.h"
46-
#if NRFX_SPIM_ENABLED
46+
#if NRFX_SPIM_ENABLED == 1 || defined(DEVICE_SPIM)
4747
#include "nrfx_spim.h"
48-
#elif NRFX_SPI_ENABLED
48+
#elif NRFX_SPI_ENABLED == 1 || defined(DEVICE_SPI)
4949
#include "nrfx_spi.h"
5050
#endif
5151
#include "nrf_twi.h"
@@ -94,9 +94,9 @@ struct serial_s {
9494
struct spi_s {
9595
int instance;
9696
PinName cs;
97-
#if NRFX_SPIM_ENABLED
97+
#if NRFX_SPIM_ENABLED == 1 || defined(DEVICE_SPIM)
9898
nrfx_spim_config_t config;
99-
#elif NRFX_SPI_ENABLED
99+
#elif NRFX_SPI_ENABLED == 1 || defined(DEVICE_SPI)
100100
nrfx_spi_config_t config;
101101
#endif
102102
bool update;

0 commit comments

Comments
 (0)