aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Peripheral
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-04-26 10:29:59 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-04-26 10:29:59 +0000
commit58e42c6ca92c4e6181967f83e40d9dea1ea48259 (patch)
tree39e9480b161df1d10878df0b21a336813cec3347 /LUFA/Drivers/Peripheral
parente21b620bf6cc9fb1bb9e516efb57b1cb12c00085 (diff)
downloadlufa-58e42c6ca92c4e6181967f83e40d9dea1ea48259.tar.gz
lufa-58e42c6ca92c4e6181967f83e40d9dea1ea48259.tar.bz2
lufa-58e42c6ca92c4e6181967f83e40d9dea1ea48259.zip
Fixed SPI driver init function not clearing SPI2X bit when not needed.
Fixed PREVENT ALLOW MEDIUM REMOVAL command issuing in the MassStorageHost demo using incorrect parameters (thanks to Mike Alex). Fixed MassStorageHost demo broken due to an incorrect if statement test in MassStore_GetReturnedStatus().
Diffstat (limited to 'LUFA/Drivers/Peripheral')
-rw-r--r--LUFA/Drivers/Peripheral/SPI.h4
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.