diff options
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r-- | LUFA/Drivers/Peripheral/SPI.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/LUFA/Drivers/Peripheral/SPI.h b/LUFA/Drivers/Peripheral/SPI.h index d8d60ede5..66cdaf513 100644 --- a/LUFA/Drivers/Peripheral/SPI.h +++ b/LUFA/Drivers/Peripheral/SPI.h @@ -102,7 +102,9 @@ (PrescalerMask & ~SPI_USE_DOUBLESPEED));
if (PrescalerMask & SPI_USE_DOUBLESPEED)
- SPSR = (1 << SPI2X);
+ SPSR |= (1 << SPI2X);
+ else
+ SPSR &= ~(1 << SPI2X);
}
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
|