Fix race in SPI endTransaction

This commit is contained in:
me-no-dev 2017-09-27 16:27:44 +08:00
parent db77195404
commit 2b6d47ac17

View File

@ -127,8 +127,8 @@ void SPIClass::beginTransaction(SPISettings settings)
void SPIClass::endTransaction() void SPIClass::endTransaction()
{ {
if(_inTransaction){ if(_inTransaction){
spiEndTransaction(_spi);
_inTransaction = false; _inTransaction = false;
spiEndTransaction(_spi);
} }
} }