Ensure that the USB_DeviceState variable is properly set upon wakeup events, to the...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 23 Jul 2009 08:00:12 +0000 (08:00 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 23 Jul 2009 08:00:12 +0000 (08:00 +0000)
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
Demos/Device/ClassDriver/CDC/CDC.c
Demos/Device/ClassDriver/DualCDC/DualCDC.c
Demos/Device/Incomplete/Sideshow/Descriptors.c
LUFA/Drivers/USB/HighLevel/USBInterrupt.c

index 484fb6b..3c59605 100644 (file)
@@ -50,7 +50,7 @@
                #include <LUFA/Drivers/USB/USB.h>\r
                \r
        /* Preprocessor Checks: */\r
-               #if !defined(__AVR_AT90USB162__)\r
+               #if !defined(__AVR_AT90USB162__) && !defined(__AVR_AT90USB646__)\r
                        #error This bootloader is not compatible with the selected AVR model.\r
                #endif\r
 \r
index 8ecfb7b..cc8abe4 100644 (file)
@@ -107,7 +107,7 @@ void CheckJoystickMovement(void)
        char*       ReportString  = NULL;\r
        static bool ActionSent    = false;\r
        \r
-       char* JoystickStrings[] =\r
+       char* const JoystickStrings[] =\r
                {\r
                        "Joystick Up\r\n",\r
                        "Joystick Down\r\n",\r
index 82bfdc8..adc17ae 100644 (file)
@@ -144,7 +144,7 @@ void CheckJoystickMovement(void)
        char*       ReportString  = NULL;\r
        static bool ActionSent = false;\r
 \r
-       char* JoystickStrings[] =\r
+       char* const JoystickStrings[] =\r
                {\r
                        "Joystick Up\r\n",\r
                        "Joystick Down\r\n",\r
index 3aaaa80..275892b 100644 (file)
@@ -42,7 +42,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
        Endpoint0Size:          8,\r
                \r
        VendorID:               0x03EB,\r
-       ProductID:              0xDC03,\r
+       ProductID:              0x2060,\r
        ReleaseNumber:          0x0000,\r
                \r
        ManufacturerStrIndex:   0x01,\r
index 5edefa9..20545a4 100644 (file)
@@ -143,7 +143,7 @@ ISR(USB_GEN_vect, ISR_BLOCK)
                USB_DeviceState = DEVICE_STATE_Powered;\r
                EVENT_USB_Connect();\r
                #else\r
-               USB_DeviceState = DEVICE_STATE_Configured;\r
+               USB_DeviceState = (USB_ConfigurationNumber) ? DEVICE_STATE_Configured : DEVICE_STATE_Addressed;\r
                EVENT_USB_WakeUp();             \r
                #endif\r
        }\r