X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/d38fa49cb6cb3804c9bb17601688a62ba466b535..d475ea4394ba0e16f89300ebeb452cea7c2d9232:/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.