From 58e42c6ca92c4e6181967f83e40d9dea1ea48259 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 26 Apr 2009 10:29:59 +0000 Subject: 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(). --- LUFA/ChangeLog.txt | 3 +++ LUFA/Drivers/Peripheral/SPI.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'LUFA') diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt index 4b1c5dcef..bdff2bf09 100644 --- a/LUFA/ChangeLog.txt +++ b/LUFA/ChangeLog.txt @@ -63,6 +63,9 @@ * - Renamed the FEATURELESS_CONTROL_ONLY_DEVICE compile-time token to CONTROL_ONLY_DEVICE * - Endpoint configuration is now refined to give better output when all configurations have static inputs - removed the now useless * STATIC_ENDPOINT_CONFIGURATION compile time token + * - 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() * * * \section Sec_ChangeLog090401 Version 090401 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. -- cgit v1.2.3