Skip to content

Commit 6b01143

Browse files
Fix logic in SPIClass::setHwCs. (espressif#4559)
Fixes espressif#4558
1 parent 18832bb commit 6b01143

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SPI/src/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void SPIClass::setHwCs(bool use)
8585
if(use && !_use_hw_ss) {
8686
spiAttachSS(_spi, 0, _ss);
8787
spiSSEnable(_spi);
88-
} else if(_use_hw_ss) {
88+
} else if(!use && _use_hw_ss) {
8989
spiSSDisable(_spi);
9090
spiDetachSS(_spi, _ss);
9191
}

0 commit comments

Comments
 (0)