Fix broken USART SPI driver for the AVR8 architecture.

pull/1469/head
Dean Camera 11 years ago
parent 5558b2f221
commit a4a6958524

@ -40,6 +40,7 @@
* - Fixed Pipe_GetBoundEndpointAddress() returning invalid endpoint directions on AVR8 architecture devices (thanks to decerri)
* under some circumstances
* - Fixed incorrect USB device state set when a suspended LUFA device is woken while addressed but not configured (thanks to Balaji Krishnan)
* - Fixed broken USART SPI driver for the AVR8 architecture due to incorrect initialization
* - Library Applications:
* - Added handler for SCSI_CMD_START_STOP_UNIT in demos using the Mass Storage class, to prevent ejection errors on *nix systems due to an
* unknown SCSI command

@ -133,13 +133,13 @@
static inline void SerialSPI_Init(const uint8_t SPIOptions,
const uint32_t BaudRate)
{
UBRR1 = SERIAL_SPI_UBBRVAL(BaudRate);
DDRD |= ((1 << 3) | (1 << 5));
PORTD |= (1 << 2);
UCSR1C = ((1 << UMSEL11) | (1 << UMSEL10) | SPIOptions);
UCSR1B = ((1 << TXEN1) | (1 << RXEN1));
DDRD |= (1 << 3);
PORTD |= (1 << 2);
UBRR1 = SERIAL_SPI_UBBRVAL(BaudRate);
}
/** Turns off the USART driver, disabling and returning used hardware to their default configuration. */
@ -151,7 +151,7 @@
UBRR1 = 0;
DDRD &= ~(1 << 3);
DDRD &= ~((1 << 3) | (1 << 5));
PORTD &= ~(1 << 2);
}

Loading…
Cancel
Save