Skip to content

Commit

Permalink
Fix logic in SPIClass::setHwCs. (#4559)
Browse files Browse the repository at this point in the history
Fixes #4558
  • Loading branch information
InvncibiltyCloak authored Nov 23, 2020
1 parent 18832bb commit 6b01143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/SPI/src/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void SPIClass::setHwCs(bool use)
if(use && !_use_hw_ss) {
spiAttachSS(_spi, 0, _ss);
spiSSEnable(_spi);
} else if(_use_hw_ss) {
} else if(!use && _use_hw_ss) {
spiSSDisable(_spi);
spiDetachSS(_spi, _ss);
}
Expand Down

0 comments on commit 6b01143

Please sign in to comment.