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)

pull/4509/head
Kevin Gilbert 2017-06-07 13:48:41 -05:00
parent baf45b6596
commit f324647aae
1 changed files with 2 additions and 0 deletions

View File

@ -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) \