Merge branch 'xmega-twi' of github.com:jamuraa/lufa into xmega-twi-integration
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 13 Aug 2013 19:04:40 +0000 (21:04 +0200)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 13 Aug 2013 19:04:40 +0000 (21:04 +0200)
LUFA/DoxygenPages/ChangeLog.txt
LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
LUFA/StudioIntegration/VSIX/LUFA.dll
LUFA/StudioIntegration/VSIX/LUFA.pkgdef
Projects/USBtoSerial/asf.xml

index 3dce7a3..924aebf 100644 (file)
@@ -40,6 +40,8 @@
   *   - 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
+  *   - Fixed re-enumeration issue of XMEGA architecture targets (thanks to xjedlins)
   *  - 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
index f12aa77..e449a8f 100644 (file)
                        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. */
 
                                UBRR1  = 0;
 
-                               DDRD  &= ~(1 << 3);
+                               DDRD  &= ~((1 << 3) | (1 << 5));
                                PORTD &= ~(1 << 2);
                        }
 
index 209bf94..9651193 100644 (file)
@@ -93,7 +93,7 @@ ISR(USB_BUSEVENT_vect)
                USB_DeviceState                = DEVICE_STATE_Default;
                USB_Device_ConfigurationNumber = 0;
 
-               USB_Device_SetDeviceAddress(0);
+               USB_Device_EnableDeviceAddress(0);
 
                Endpoint_ClearEndpoints();
                Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
index 554b049..d3e9c23 100644 (file)
Binary files a/LUFA/StudioIntegration/VSIX/LUFA.dll and b/LUFA/StudioIntegration/VSIX/LUFA.dll differ
index 31a97ce..b1b2f94 100644 (file)
Binary files a/LUFA/StudioIntegration/VSIX/LUFA.pkgdef and b/LUFA/StudioIntegration/VSIX/LUFA.pkgdef differ
index 04388fa..be0c009 100644 (file)
@@ -43,6 +43,8 @@
                <require idref="lufa.platform"/>\r
                <require idref="lufa.drivers.peripheral.usart"/>\r
                <require idref="lufa.drivers.usb"/>\r
+               <require idref="lufa.drivers.board"/>\r
+               <require idref="lufa.drivers.board.leds"/>\r
                <require idref="lufa.drivers.misc.ringbuffer"/>\r
        </module>\r
 </asf>\r