diff options
| author | JF <jf@codingfield.com> | 2020-05-24 15:46:43 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-05-24 15:46:43 (GMT) |
| commit | 4154dae01acfd4f377101858c1b9b9faf0d1fdcd (patch) | |
| tree | b6812599b773f67f3c3beb7f9898355f42dd9e73 /src/drivers/SpiMaster.cpp | |
| parent | 84b996bf3f7b11ffc2684fa1ccd4453306914c5b (diff) | |
Fix race condition in SpiMaster.cpp.
Diffstat (limited to 'src/drivers/SpiMaster.cpp')
| -rw-r--r-- | src/drivers/SpiMaster.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp index 18bf336..ff24118 100644 --- a/src/drivers/SpiMaster.cpp +++ b/src/drivers/SpiMaster.cpp @@ -185,6 +185,8 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t *data, size_t size) { if(size == 1) { while (spiBaseAddress->EVENTS_END == 0); + nrf_gpio_pin_set(this->pinCsn); + currentBufferAddr = 0; xSemaphoreGive(mutex); } |
