Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions obc/app/drivers/rm46/obc_spi_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,10 @@ static void spiLogErrors(uint32_t spiErr) {
}

bool isSpiBusOwner(SemaphoreHandle_t spiMutex) {
portENTER_CRITICAL();
TaskHandle_t owner = xSemaphoreGetMutexHolder(spiMutex);
portEXIT_CRITICAL();
TaskHandle_t currentTask = xTaskGetCurrentTaskHandle();

return xSemaphoreGetMutexHolder(spiMutex) == owner;
return currentTask == owner;
}

obc_error_code_t getSpiMutex(spiBASE_t *spi, SemaphoreHandle_t *mutex) {
Expand Down
Loading