Skip to content

Commit f324647

Browse files
committed
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)
1 parent baf45b6 commit f324647

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ static void master_event_handler(uint8_t spi_idx,
141141

142142
if (p_event->type == NRF_DRV_SPI_EVENT_DONE) {
143143
p_spi_info->flag.busy = false;
144+
#if DEVICE_SPI_ASYNCH
144145
if (p_spi_info->handler) {
145146
void (*handler)(void) = (void (*)(void))p_spi_info->handler;
146147
p_spi_info->handler = 0;
147148
handler();
148149
}
150+
#endif
149151
}
150152
}
151153
#define MASTER_EVENT_HANDLER(idx) \

0 commit comments

Comments
 (0)