Skip to content

Commit 8be51a4

Browse files
authored
ensure to lock params for whole transaction
1 parent 5b2e387 commit 8be51a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SPI/src/SPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ void SPIClass::beginTransaction(SPISettings settings)
165165
}
166166
spiTransaction(_spi, _div, settings._dataMode, settings._bitOrder);
167167
_inTransaction = true;
168-
SPI_PARAM_UNLOCK();
169168
}
170169

171170
void SPIClass::endTransaction()
172171
{
173172
if(_inTransaction){
174173
_inTransaction = false;
175174
spiEndTransaction(_spi);
175+
SPI_PARAM_UNLOCK();
176176
}
177177
}
178178

0 commit comments

Comments
 (0)