Oops - fix broken SPI driver due to missing bit inversion on a port mask.
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 20 Oct 2010 08:08:59 +0000 (08:08 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 20 Oct 2010 08:08:59 +0000 (08:08 +0000)
LUFA/Drivers/Peripheral/SPI.h

index 3858aca..df69e82 100644 (file)
                         */
                        static inline void SPI_Init(const uint8_t SPIOptions)
                        {
                         */
                        static inline void SPI_Init(const uint8_t SPIOptions)
                        {
-                               DDRB  |= ((1 << 1) | (1 << 2));
-                               DDRB  &= ((1 << 0) | (1 << 3));
-                               PORTB |= ((1 << 0) | (1 << 3));
+                               DDRB  |=  ((1 << 1) | (1 << 2));
+                               DDRB  &= ~((1 << 0) | (1 << 3));
+                               PORTB |=  ((1 << 0) | (1 << 3));
 
                                SPCR   = ((1 << SPE) | SPIOptions);
 
 
                                SPCR   = ((1 << SPE) | SPIOptions);