SPI defines cleanup (#14506)

This commit is contained in:
Giuliano Zaro
2019-07-05 08:59:37 +02:00
committed by Scott Lahteine
parent eb6dec03bd
commit 66e16af29d
5 changed files with 3 additions and 35 deletions

View File

@@ -173,7 +173,7 @@ void spiBegin(void) {
// Invert the SPI2X bit
clockDiv ^= 0x1;
SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == SPI_LSBFIRST) ? _BV(DORD) : 0) |
SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
(dataMode << CPHA) | ((clockDiv >> 1) << SPR0);
SPSR = clockDiv | 0x01;
}