X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/e21b620bf6cc9fb1bb9e516efb57b1cb12c00085..58e42c6ca92c4e6181967f83e40d9dea1ea48259:/LUFA/Drivers/Peripheral/SPI.h 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.