Skip to content

Commit 2d5776a

Browse files
committed
Fix more SPIM
1 parent c6bc651 commit 2d5776a

File tree

1 file changed

+7
-8
lines changed
  • targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52

1 file changed

+7
-8
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/spi_api.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,18 @@
4646

4747
#if NRFX_CHECK(NRFX_SPIM_ENABLED)
4848
#include "nrfx_spim.h"
49+
#elif NRFX_CHECK(NRFX_SPI_ENABLED)
50+
#include "nrfx_spi.h"
51+
#endif
4952

5053
#if 1
5154
#define DEBUG_PRINTF(...) printf(__VA_ARGS__)
5255
#else
5356
#define DEBUG_PRINTF(...)
5457
#endif
5558

59+
#if NRFX_CHECK(NRFX_SPIM_ENABLED)
60+
5661
/* Pre-allocate instances and share them globally. */
5762
static const nrfx_spim_t nordic_nrf5_spim_instance[4] = {
5863
NRFX_SPIM_INSTANCE(0),
@@ -871,15 +876,9 @@ void spi_abort_asynch(spi_t *obj)
871876
}
872877

873878
#endif // DEVICE_SPI_ASYNCH
879+
#endif //NRFX_SPIM_ENABLED
874880

875-
#elif NRFX_CHECK(NRFX_SPI_ENABLED)
876-
#include "nrfx_spi.h"
877-
878-
#if 0
879-
#define DEBUG_PRINTF(...) printf(__VA_ARGS__)
880-
#else
881-
#define DEBUG_PRINTF(...)
882-
#endif
881+
#if NRFX_CHECK(NRFX_SPI_ENABLED)
883882

884883
/* Pre-allocate instances and share them globally. */
885884
static const nrfx_spi_t nordic_nrf5_spi_instance[3] = {

0 commit comments

Comments
 (0)