From f324647aae962cc396512ca1136b577e5b3d9029 Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Wed, 7 Jun 2017 13:48:41 -0500 Subject: [PATCH] Original pull request had added these checks to a deleted file. Replicating that change to allow builds on the NRF52840_DK (see original PR #4088 to see the explanation for the removal of spi async) --- targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c b/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c index 225fbf2b47..ba8c7d27cb 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c @@ -141,11 +141,13 @@ static void master_event_handler(uint8_t spi_idx, if (p_event->type == NRF_DRV_SPI_EVENT_DONE) { p_spi_info->flag.busy = false; +#if DEVICE_SPI_ASYNCH if (p_spi_info->handler) { void (*handler)(void) = (void (*)(void))p_spi_info->handler; p_spi_info->handler = 0; handler(); } +#endif } } #define MASTER_EVENT_HANDLER(idx) \