From 2b6d47ac178211a8e5cf6705ccce15fcbdb9813e Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Wed, 27 Sep 2017 16:27:44 +0800 Subject: [PATCH] Fix race in SPI endTransaction --- libraries/SPI/src/SPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index e1e7a15c..629b50bc 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -127,8 +127,8 @@ void SPIClass::beginTransaction(SPISettings settings) void SPIClass::endTransaction() { if(_inTransaction){ - spiEndTransaction(_spi); _inTransaction = false; + spiEndTransaction(_spi); } }