1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

OP-911: Fixed SPI_ClaimbusISR for F1

+review OPReview-447
This commit is contained in:
Alessio Morale 2013-04-17 22:41:53 +02:00
parent 6214d0d471
commit 66b1d285d5

View File

@ -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;
}