Trailing whitespace clean

This commit is contained in:
Scott Lahteine
2018-01-05 10:10:55 -06:00
parent 1746a7352e
commit 1c41de16d4
30 changed files with 68 additions and 71 deletions

View File

@ -95,8 +95,7 @@ void spiBegin (void) {
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
/** SPI receive a byte */
uint8_t spiRec(void) {
SPDR = 0xFF;
@ -157,7 +156,7 @@ void spiBegin (void) {
// is 2 ^^ (clock_div + 1). If nothing is slow enough, we'll use the
// slowest (128 == 2 ^^ 7, so clock_div = 6).
uint8_t clockDiv;
// When the clock is known at compiletime, use this if-then-else
// cascade, which the compiler knows how to completely optimize
// away. When clock is not known, use a loop instead, which generates
@ -196,10 +195,10 @@ void spiBegin (void) {
SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == SPI_LSBFIRST) ? _BV(DORD) : 0) |
(dataMode << CPHA) | ((clockDiv >> 1) << SPR0);
SPSR = clockDiv | 0x01;
SPSR = clockDiv | 0x01;
}
//------------------------------------------------------------------------------
#else // SOFTWARE_SPI
//------------------------------------------------------------------------------
@ -216,7 +215,7 @@ void spiBegin (void) {
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
// nothing to do
UNUSED(spiBeginTransaction);
}
}
//------------------------------------------------------------------------------
/** Soft SPI receive byte */
@ -280,7 +279,7 @@ void spiBegin (void) {
spiSend(token);
for (uint16_t i = 0; i < 512; i++)
spiSend(buf[i]);
}
}
#endif // SOFTWARE_SPI