@@ -136,20 +136,14 @@ void SpiMaster::OnEndEvent() {
136
136
137
137
spiBaseAddress->TASKS_START = 1 ;
138
138
} else {
139
- BaseType_t xHigherPriorityTaskWoken = pdFALSE;
140
- if (taskToNotify != nullptr ) {
141
- vTaskNotifyGiveFromISR (taskToNotify, &xHigherPriorityTaskWoken);
142
- portYIELD_FROM_ISR (xHigherPriorityTaskWoken);
143
- }
144
-
145
139
nrf_gpio_pin_set (this ->pinCsn );
146
140
if (this ->TransactionHook != nullptr ) {
147
141
this ->TransactionHook (false );
148
142
}
149
143
currentBufferAddr = 0 ;
150
- BaseType_t xHigherPriorityTaskWoken2 = pdFALSE;
151
- xSemaphoreGiveFromISR (mutex, &xHigherPriorityTaskWoken2 );
152
- portYIELD_FROM_ISR (xHigherPriorityTaskWoken | xHigherPriorityTaskWoken2 );
144
+ BaseType_t xHigherPriorityTaskWoken = pdFALSE;
145
+ xSemaphoreGiveFromISR (mutex, &xHigherPriorityTaskWoken );
146
+ portYIELD_FROM_ISR (xHigherPriorityTaskWoken);
153
147
}
154
148
}
155
149
@@ -181,7 +175,6 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*T
181
175
return false ;
182
176
auto ok = xSemaphoreTake (mutex, portMAX_DELAY);
183
177
ASSERT (ok == true );
184
- taskToNotify = xTaskGetCurrentTaskHandle ();
185
178
186
179
this ->TransactionHook = TransactionHook;
187
180
this ->pinCsn = pinCsn;
@@ -226,7 +219,6 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*T
226
219
bool SpiMaster::Read (uint8_t pinCsn, uint8_t * cmd, size_t cmdSize, uint8_t * data, size_t dataSize) {
227
220
xSemaphoreTake (mutex, portMAX_DELAY);
228
221
229
- taskToNotify = nullptr ;
230
222
this ->TransactionHook = nullptr ;
231
223
this ->pinCsn = pinCsn;
232
224
DisableWorkaroundForFtpan58 (spiBaseAddress, 0 , 0 );
@@ -275,8 +267,6 @@ void SpiMaster::Wakeup() {
275
267
bool SpiMaster::WriteCmdAndBuffer (uint8_t pinCsn, const uint8_t * cmd, size_t cmdSize, const uint8_t * data, size_t dataSize) {
276
268
xSemaphoreTake (mutex, portMAX_DELAY);
277
269
278
- taskToNotify = nullptr ;
279
-
280
270
this ->TransactionHook = nullptr ;
281
271
282
272
this ->pinCsn = pinCsn;
0 commit comments