We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 184ed70 commit 96dbe10Copy full SHA for 96dbe10
SPI.cpp
@@ -56,6 +56,6 @@ void SPIClass::setDataMode(uint8_t mode)
56
void SPIClass::setClockDivider(uint8_t rate)
57
{
58
SPCR = (SPCR & ~SPI_CLOCK_MASK) | (rate & SPI_CLOCK_MASK);
59
- SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | (rate & SPI_2XCLOCK_MASK);
+ SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((rate >> 2) & SPI_2XCLOCK_MASK);
60
}
61
0 commit comments