aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/SpiMaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/SpiMaster.cpp')
-rw-r--r--src/drivers/SpiMaster.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp
index 4c2bc940..f878c7d5 100644
--- a/src/drivers/SpiMaster.cpp
+++ b/src/drivers/SpiMaster.cpp
@@ -136,20 +136,14 @@ void SpiMaster::OnEndEvent() {
spiBaseAddress->TASKS_START = 1;
} else {
- BaseType_t xHigherPriorityTaskWoken = pdFALSE;
- if (taskToNotify != nullptr) {
- vTaskNotifyGiveFromISR(taskToNotify, &xHigherPriorityTaskWoken);
- portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
- }
-
nrf_gpio_pin_set(this->pinCsn);
if (this->TransactionHook != nullptr) {
this->TransactionHook(false);
}
currentBufferAddr = 0;
- BaseType_t xHigherPriorityTaskWoken2 = pdFALSE;
- xSemaphoreGiveFromISR(mutex, &xHigherPriorityTaskWoken2);
- portYIELD_FROM_ISR(xHigherPriorityTaskWoken | xHigherPriorityTaskWoken2);
+ BaseType_t xHigherPriorityTaskWoken = pdFALSE;
+ xSemaphoreGiveFromISR(mutex, &xHigherPriorityTaskWoken);
+ portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
@@ -181,7 +175,6 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*T
return false;
auto ok = xSemaphoreTake(mutex, portMAX_DELAY);
ASSERT(ok == true);
- taskToNotify = xTaskGetCurrentTaskHandle();
this->TransactionHook = TransactionHook;
this->pinCsn = pinCsn;
@@ -226,7 +219,6 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*T
bool SpiMaster::Read(uint8_t pinCsn, uint8_t* cmd, size_t cmdSize, uint8_t* data, size_t dataSize) {
xSemaphoreTake(mutex, portMAX_DELAY);
- taskToNotify = nullptr;
this->TransactionHook = nullptr;
this->pinCsn = pinCsn;
DisableWorkaroundForFtpan58(spiBaseAddress, 0, 0);
@@ -275,8 +267,6 @@ void SpiMaster::Wakeup() {
bool SpiMaster::WriteCmdAndBuffer(uint8_t pinCsn, const uint8_t* cmd, size_t cmdSize, const uint8_t* data, size_t dataSize) {
xSemaphoreTake(mutex, portMAX_DELAY);
- taskToNotify = nullptr;
-
this->TransactionHook = nullptr;
this->pinCsn = pinCsn;