Skip to content

Commit

Permalink
Bugfix: Bit Bang SPI did not correct idle clock level for modes 2 and 3
Browse files Browse the repository at this point in the history
  • Loading branch information
vickash committed Sep 14, 2024
1 parent 4ea1711 commit cc641e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/DenkoSPIBB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void Denko::spiBBtransfer( uint8_t clock, uint8_t input, uint8_t output, uint8_t
// Set idle state of clock pin based on SPI mode.
pinMode(clock, OUTPUT);
if ((mode == 0)||(mode == 1)) digitalWrite(clock, LOW);
if ((mode == 2)||(mode == 3)) digitalWrite(clock, LOW);
if ((mode == 2)||(mode == 3)) digitalWrite(clock, HIGH);

// Stream read bytes as if coming from select pin.
if (rLength > 0) {
Expand Down

0 comments on commit cc641e6

Please sign in to comment.