@@ -149,20 +149,14 @@ void SpiMaster::OnEndEvent() {
149
149
150
150
spiBaseAddress->TASKS_START = 1 ;
151
151
} else {
152
- BaseType_t xHigherPriorityTaskWoken = pdFALSE;
153
- if (taskToNotify != nullptr ) {
154
- vTaskNotifyGiveFromISR (taskToNotify, &xHigherPriorityTaskWoken);
155
- portYIELD_FROM_ISR (xHigherPriorityTaskWoken);
156
- }
157
-
158
152
nrf_gpio_pin_set (this ->pinCsn );
159
153
if (this ->TransactionHook != nullptr ) {
160
154
this ->TransactionHook (false );
161
155
}
162
156
currentBufferAddr = 0 ;
163
- BaseType_t xHigherPriorityTaskWoken2 = pdFALSE;
164
- xSemaphoreGiveFromISR (mutex, &xHigherPriorityTaskWoken2 );
165
- portYIELD_FROM_ISR (xHigherPriorityTaskWoken | xHigherPriorityTaskWoken2 );
157
+ BaseType_t xHigherPriorityTaskWoken = pdFALSE;
158
+ xSemaphoreGiveFromISR (mutex, &xHigherPriorityTaskWoken );
159
+ portYIELD_FROM_ISR (xHigherPriorityTaskWoken);
166
160
}
167
161
}
168
162
@@ -194,7 +188,6 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*T
194
188
return false ;
195
189
auto ok = xSemaphoreTake (mutex, portMAX_DELAY);
196
190
ASSERT (ok == true );
197
- taskToNotify = xTaskGetCurrentTaskHandle ();
198
191
199
192
this ->TransactionHook = TransactionHook;
200
193
this ->pinCsn = pinCsn;
@@ -239,7 +232,6 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*T
239
232
bool SpiMaster::Read (uint8_t pinCsn, uint8_t * cmd, size_t cmdSize, uint8_t * data, size_t dataSize) {
240
233
xSemaphoreTake (mutex, portMAX_DELAY);
241
234
242
- taskToNotify = nullptr ;
243
235
this ->TransactionHook = nullptr ;
244
236
this ->pinCsn = pinCsn;
245
237
DisableWorkaroundForErratum58 ();
@@ -288,8 +280,6 @@ void SpiMaster::Wakeup() {
288
280
bool SpiMaster::WriteCmdAndBuffer (uint8_t pinCsn, const uint8_t * cmd, size_t cmdSize, const uint8_t * data, size_t dataSize) {
289
281
xSemaphoreTake (mutex, portMAX_DELAY);
290
282
291
- taskToNotify = nullptr ;
292
-
293
283
this ->TransactionHook = nullptr ;
294
284
295
285
this ->pinCsn = pinCsn;
0 commit comments