projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed SPI driver init function not clearing SPI2X bit when not needed.
[pub/USBasp.git]
/
LUFA
/
Drivers
/
Peripheral
/
SPI.h
diff --git
a/LUFA/Drivers/Peripheral/SPI.h
b/LUFA/Drivers/Peripheral/SPI.h
index
d8d60ed
..
66cdaf5
100644
(file)
--- a/
LUFA/Drivers/Peripheral/SPI.h
+++ b/
LUFA/Drivers/Peripheral/SPI.h
@@
-102,7
+102,9
@@
(PrescalerMask & ~SPI_USE_DOUBLESPEED));
\r
\r
if (PrescalerMask & SPI_USE_DOUBLESPEED)
\r
(PrescalerMask & ~SPI_USE_DOUBLESPEED));
\r
\r
if (PrescalerMask & SPI_USE_DOUBLESPEED)
\r
- SPSR = (1 << SPI2X);
\r
+ SPSR |= (1 << SPI2X);
\r
+ else
\r
+ SPSR &= ~(1 << SPI2X);
\r
}
\r
\r
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
\r
}
\r
\r
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
\r