diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c index 6769a0c2d6..f925956156 100644 --- a/Bootloaders/CDC/BootloaderCDC.c +++ b/Bootloaders/CDC/BootloaderCDC.c @@ -235,15 +235,7 @@ static void ReadWriteMemoryBlock(const uint8_t Command) while (BlockSize--) { - if (MemoryType == 'E') - { - /* Read the next EEPROM byte into the endpoint */ - WriteNextResponseByte(eeprom_read_byte((uint8_t*)(uint16_t)(CurrAddress >> 1))); - - /* Increment the address counter after use */ - CurrAddress += 2; - } - else + if (MemoryType == 'F') { /* Read the next FLASH byte from the current FLASH page */ #if (FLASHEND > 0xFFFF) @@ -258,6 +250,14 @@ static void ReadWriteMemoryBlock(const uint8_t Command) HighByte = !HighByte; } + else + { + /* Read the next EEPROM byte into the endpoint */ + WriteNextResponseByte(eeprom_read_byte((uint8_t*)(uint16_t)(CurrAddress >> 1))); + + /* Increment the address counter after use */ + CurrAddress += 2; + } } } else diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c index b78a6d3317..0c83cd8dde 100644 --- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c @@ -110,7 +110,7 @@ void SetupHardware(void) clock_prescale_set(clock_div_1); /* Hardware Initialization */ - Joystick_Init(); + Serial_Init(9600, false); LEDs_Init(); USB_Init(); } diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h index 4ceb931a3d..c982ad1a62 100644 --- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h +++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h @@ -48,7 +48,6 @@ #include #include - #include #include #include #include diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c index 736c0af10b..141a452763 100644 --- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c @@ -81,9 +81,9 @@ void SetupHardware(void) clock_prescale_set(clock_div_1); /* Hardware Initialization */ + Serial_Init(9600, false); LEDs_Init(); - ReconfigureUSART(); - USB_Init(); + USB_Init(); } /** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and diff --git a/LUFA.pnproj b/LUFA.pnproj index dd3739e949..d73823e0a9 100644 --- a/LUFA.pnproj +++ b/LUFA.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/LUFA/DriverStubs/Buttons.h b/LUFA/DriverStubs/Buttons.h index 0d02e5c71c..9449bcbfd6 100644 --- a/LUFA/DriverStubs/Buttons.h +++ b/LUFA/DriverStubs/Buttons.h @@ -46,8 +46,6 @@ #include #include - #include "../../../Common/Common.h" - // TODO: Add any required includes here /* Enable C linkage for C++ Compilers: */ diff --git a/LUFA/DriverStubs/Joystick.h b/LUFA/DriverStubs/Joystick.h index ca80672b31..a09f8db9b5 100644 --- a/LUFA/DriverStubs/Joystick.h +++ b/LUFA/DriverStubs/Joystick.h @@ -46,8 +46,6 @@ /* Includes: */ #include - #include "../../../Common/Common.h" - // TODO: Add any required includes here /* Enable C linkage for C++ Compilers: */ diff --git a/LUFA/DriverStubs/LEDs.h b/LUFA/DriverStubs/LEDs.h index 3f4cca0060..0421f14d35 100644 --- a/LUFA/DriverStubs/LEDs.h +++ b/LUFA/DriverStubs/LEDs.h @@ -45,8 +45,6 @@ /* Includes: */ #include - #include "../../../Common/Common.h" - // TODO: Add any required includes here /* Enable C linkage for C++ Compilers: */ diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 6037593e2c..dab0ec6b69 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -86,6 +86,7 @@ * - Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered * - Fixed incorrect BUTTONS_BUTTON1 for the STK526 target * - Fixed RNDIS demos freezing when more than one connection was attempted simultaneously, causing memory corruption + * - Fixed USBtoSerial demo receiving noise from the USART due to pullup not being enabled * * * \section Sec_ChangeLog090605 Version 090605 diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c index d7e0413a6d..100c897fa1 100644 --- a/Projects/Benito/Benito.c +++ b/Projects/Benito/Benito.c @@ -141,6 +141,7 @@ void SetupHardware(void) clock_prescale_set(clock_div_1); /* Hardware Initialization */ + Serial_Init(9600, false); LEDs_Init(); USB_Init(); @@ -165,17 +166,17 @@ void EVENT_USB_Device_Connect(void) void EVENT_USB_Device_Disconnect(void) { PingPongMSRemaining = 0; - LEDs_TurnOffLEDs(LEDMASK_BUSY); + LEDs_SetAllLEDs(LEDS_NO_LEDS); } /** Event handler for the library USB Configuration Changed event. */ void EVENT_USB_Device_ConfigurationChanged(void) { PingPongMSRemaining = 0; - LEDs_TurnOffLEDs(LEDMASK_BUSY); + LEDs_SetAllLEDs(LEDS_NO_LEDS); if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface))) - LEDs_TurnOnLEDs(LEDMASK_ERROR); + LEDs_SetAllLEDs(LEDMASK_ERROR); } /** Event handler for the library USB Unhandled Control Request event. */ @@ -233,9 +234,9 @@ void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const C /* Check if the DTR line has been asserted - if so, start the target AVR's reset pulse */ if (CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR) { - LEDs_TurnOnLEDs(LEDMASK_BUSY); + LEDs_SetAllLEDs(LEDMASK_BUSY); - AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK; - ResetPulseMSRemaining = AVR_RESET_PULSE_MS; + AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK; + ResetPulseMSRemaining = AVR_RESET_PULSE_MS; } } diff --git a/Projects/Benito/Benito.h b/Projects/Benito/Benito.h index 3b0dfcd2cb..daf8315b25 100644 --- a/Projects/Benito/Benito.h +++ b/Projects/Benito/Benito.h @@ -57,8 +57,10 @@ /** LED mask for the library LED driver, to indicate RX activity. */ #define LEDMASK_RX LEDS_LED2 + /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ #define LEDMASK_ERROR (LEDS_LED1 | LEDS_LED2) + /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ #define LEDMASK_BUSY (LEDS_LED1 | LEDS_LED2) /* Function Prototypes: */ diff --git a/Projects/Benito/makefile b/Projects/Benito/makefile index 88c62e9e82..227012b16a 100644 --- a/Projects/Benito/makefile +++ b/Projects/Benito/makefile @@ -66,7 +66,7 @@ MCU = at90usb162 # Target board (see library "Board Types" documentation, USER or blank for projects not requiring # LUFA board drivers). If USER is selected, put custom board drivers in a directory called # "Board" inside the application directory. -BOARD = USBKEY +BOARD = USER # Processor frequency.