From 5dbfdaa17dc4cb35783ec121453c7dfaca9874f3 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 23 Jul 2009 08:00:12 +0000 Subject: [PATCH] Ensure that the USB_DeviceState variable is properly set upon wakeup events, to the Addressed or Configured state as needed. Add explicit support for the AT90USB646 to the Teensy bootloader now that PJRC have released the Teensy++ board. Ensure unfinished SideShow demo uses an unallocated PID value within the LUFA range. --- Bootloaders/TeensyHID/TeensyHID.h | 2 +- Demos/Device/ClassDriver/CDC/CDC.c | 2 +- Demos/Device/ClassDriver/DualCDC/DualCDC.c | 2 +- Demos/Device/Incomplete/Sideshow/Descriptors.c | 2 +- LUFA/Drivers/USB/HighLevel/USBInterrupt.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Bootloaders/TeensyHID/TeensyHID.h b/Bootloaders/TeensyHID/TeensyHID.h index 484fb6b3ac..3c59605954 100644 --- a/Bootloaders/TeensyHID/TeensyHID.h +++ b/Bootloaders/TeensyHID/TeensyHID.h @@ -50,7 +50,7 @@ #include /* Preprocessor Checks: */ - #if !defined(__AVR_AT90USB162__) + #if !defined(__AVR_AT90USB162__) && !defined(__AVR_AT90USB646__) #error This bootloader is not compatible with the selected AVR model. #endif diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c index 8ecfb7b373..cc8abe4166 100644 --- a/Demos/Device/ClassDriver/CDC/CDC.c +++ b/Demos/Device/ClassDriver/CDC/CDC.c @@ -107,7 +107,7 @@ void CheckJoystickMovement(void) char* ReportString = NULL; static bool ActionSent = false; - char* JoystickStrings[] = + char* const JoystickStrings[] = { "Joystick Up\r\n", "Joystick Down\r\n", diff --git a/Demos/Device/ClassDriver/DualCDC/DualCDC.c b/Demos/Device/ClassDriver/DualCDC/DualCDC.c index 82bfdc8f76..adc17aed36 100644 --- a/Demos/Device/ClassDriver/DualCDC/DualCDC.c +++ b/Demos/Device/ClassDriver/DualCDC/DualCDC.c @@ -144,7 +144,7 @@ void CheckJoystickMovement(void) char* ReportString = NULL; static bool ActionSent = false; - char* JoystickStrings[] = + char* const JoystickStrings[] = { "Joystick Up\r\n", "Joystick Down\r\n", diff --git a/Demos/Device/Incomplete/Sideshow/Descriptors.c b/Demos/Device/Incomplete/Sideshow/Descriptors.c index 3aaaa80313..275892b9ba 100644 --- a/Demos/Device/Incomplete/Sideshow/Descriptors.c +++ b/Demos/Device/Incomplete/Sideshow/Descriptors.c @@ -42,7 +42,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = Endpoint0Size: 8, VendorID: 0x03EB, - ProductID: 0xDC03, + ProductID: 0x2060, ReleaseNumber: 0x0000, ManufacturerStrIndex: 0x01, diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c index 5edefa9967..20545a40e8 100644 --- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c @@ -143,7 +143,7 @@ ISR(USB_GEN_vect, ISR_BLOCK) USB_DeviceState = DEVICE_STATE_Powered; EVENT_USB_Connect(); #else - USB_DeviceState = DEVICE_STATE_Configured; + USB_DeviceState = (USB_ConfigurationNumber) ? DEVICE_STATE_Configured : DEVICE_STATE_Addressed; EVENT_USB_WakeUp(); #endif }