diff --git a/flight/PiOS/STM32F10x/pios_spi.c b/flight/PiOS/STM32F10x/pios_spi.c index 320f6385d..41cc47bf1 100644 --- a/flight/PiOS/STM32F10x/pios_spi.c +++ b/flight/PiOS/STM32F10x/pios_spi.c @@ -276,8 +276,9 @@ int32_t PIOS_SPI_ClaimBusISR(uint32_t spi_id) bool valid = PIOS_SPI_validate(spi_dev); PIOS_Assert(valid) - if (xQueueGenericReceive(( xQueueHandle ) spi_dev->busy, NULL, 0x0000 , pdFALSE ) != pdTRUE) + if (xSemaphoreTakeFromISR(( xQueueHandle ) spi_dev->busy, NULL) != pdTRUE){ return -1; + } #endif return 0; }