Increase timeout of Mass Storage and Still Image host commands to 10 seconds (up...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 9 Dec 2009 00:50:55 +0000 (00:50 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 9 Dec 2009 00:50:55 +0000 (00:50 +0000)
Added brace guards to macros with parameters to prevent unintended changed evaluation of the macro expression.

Minor code cleanups (remove redundant comments, fix spacing, etc.).

61 files changed:
Bootloaders/DFU/BootloaderDFU.h
Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h
Demos/Device/ClassDriver/MassStorage/MassStorage.h
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
Demos/Device/Incomplete/Sideshow/Descriptors.c
Demos/Device/Incomplete/Sideshow/Sideshow.h
Demos/Device/LowLevel/AudioInput/Descriptors.h
Demos/Device/LowLevel/AudioOutput/Descriptors.h
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
Demos/Device/LowLevel/GenericHID/GenericHID.h
Demos/Device/LowLevel/Joystick/Joystick.h
Demos/Device/LowLevel/Keyboard/Keyboard.h
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
Demos/Device/LowLevel/MIDI/MIDI.h
Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h
Demos/Device/LowLevel/MassStorage/Lib/SCSI.h
Demos/Device/LowLevel/MassStorage/MassStorage.h
Demos/Device/LowLevel/Mouse/Mouse.h
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
Demos/Host/ClassDriver/PrinterHost/PrinterHost.h
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.h
Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.h
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.h
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
Demos/Host/LowLevel/JoystickHostWithParser/ConfigDescriptor.h
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.h
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.h
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
Demos/Host/LowLevel/MIDIHost/ConfigDescriptor.h
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.h
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.h
Demos/Host/LowLevel/MouseHost/MouseHost.h
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.h
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
Demos/Host/LowLevel/PrinterHost/PrinterHost.h
Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.h
Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.h
Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.h
Demos/Host/LowLevel/StillImageHost/StillImageHost.h
LUFA/Drivers/Board/Dataflash.h
LUFA/Drivers/USB/Class/Host/MassStorage.h
LUFA/Drivers/USB/Class/Host/StillImage.h
LUFA/Drivers/USB/HighLevel/StdDescriptors.h
LUFA/Drivers/USB/HighLevel/USBTask.h
LUFA/Drivers/USB/LowLevel/Endpoint.h
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/FutureChanges.txt
Projects/AVRISP/Lib/V2Protocol.h
Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h
Projects/MissileLauncher/MissileLauncher.c
Projects/MissileLauncher/MissileLauncher.h

index c711e43..aac341f 100644 (file)
@@ -79,7 +79,7 @@
                 *  \param[in] dataarr  Command byte array to check against\r
                 *  \param[in] cb1      First command byte to check\r
                 */\r
-               #define IS_ONEBYTE_COMMAND(dataarr, cb1)       (dataarr[0] == cb1)\r
+               #define IS_ONEBYTE_COMMAND(dataarr, cb1)       (dataarr[0] == (cb1))\r
 \r
                /** Convenience macro, used to determine if the issued command is the given two-byte long command.\r
                 *\r
@@ -87,7 +87,7 @@
                 *  \param[in] cb1      First command byte to check\r
                 *  \param[in] cb2      Second command byte to check\r
                 */\r
-               #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == cb1) && (dataarr[1] == cb2))\r
+               #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == (cb1)) && (dataarr[1] == (cb2)))\r
        \r
                /** Length of the DFU file suffix block, appended to the end of each complete memory write command.\r
                 *  The DFU file suffix is currently unused (but is designed to give extra file information, such as\r
index 2deac09..dcd5dee 100644 (file)
                #include "MassStorage.h"\r
                #include "Descriptors.h"\r
 \r
-               #include <LUFA/Common/Common.h>                 // Function Attribute, Atomic, Debug and ISR Macros\r
-               #include <LUFA/Drivers/USB/USB.h>               // USB Functionality\r
-               #include <LUFA/Drivers/USB/Class/MassStorage.h> // Mass Storage Class Driver\r
-               #include <LUFA/Drivers/Board/Dataflash.h>       // Dataflash chip driver\r
+               #include <LUFA/Common/Common.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
+               #include <LUFA/Drivers/Board/Dataflash.h>\r
 \r
        /* Preprocessor Checks: */\r
                #if (DATAFLASH_PAGE_SIZE % 16)\r
index a1cbf67..9d71e14 100644 (file)
@@ -56,9 +56,9 @@
                 *  \param[in] acode  New SCSI additional sense key to set the additional sense code to\r
                 *  \param[in] aqual  New SCSI additional sense key qualifier to set the additional sense qualifier code to\r
                 */\r
-               #define SCSI_SET_SENSE(key, acode, aqual)  MACROS{ SenseData.SenseKey = key;              \\r
-                                                                  SenseData.AdditionalSenseCode = acode; \\r
-                                                                  SenseData.AdditionalSenseQualifier = aqual; }MACROE\r
+               #define SCSI_SET_SENSE(key, acode, aqual)  MACROS{ SenseData.SenseKey = (key);                   \\r
+                                                                  SenseData.AdditionalSenseCode = (acode);      \\r
+                                                                  SenseData.AdditionalSenseQualifier = (aqual); }MACROE\r
 \r
                /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */\r
                #define DATA_READ           true\r
index fca288d..5fb37f1 100644 (file)
@@ -65,7 +65,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
                /** Total number of logical drives within the device - must be non-zero. */\r
                #define TOTAL_LUNS                1\r
index 5e9debc..b626d48 100644 (file)
@@ -42,9 +42,9 @@
                #include "MassStorageKeyboard.h"\r
                #include "Descriptors.h"\r
 \r
-               #include <LUFA/Common/Common.h>              // Function Attribute, Atomic, Debug and ISR Macros\r
-               #include <LUFA/Drivers/USB/USB.h>            // USB Functionality\r
-               #include <LUFA/Drivers/Board/Dataflash.h>    // Dataflash chip driver\r
+               #include <LUFA/Common/Common.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/Board/Dataflash.h>\r
 \r
        /* Preprocessor Checks: */\r
                #if (DATAFLASH_PAGE_SIZE % 16)\r
index c82fb78..df01dac 100644 (file)
@@ -72,7 +72,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY         LEDS_LED2\r
                \r
                /** Total number of logical drives within the device - must be non-zero. */\r
                #define TOTAL_LUNS               1\r
index b91a54d..a132a66 100644 (file)
@@ -71,7 +71,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
index 647e0b4..ed5853f 100644 (file)
@@ -192,11 +192,9 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
                                        Size    = pgm_read_byte(&SerialNumberString.Header.Size);\r
                                        break;\r
                                case 0xEE:\r
-                                       /* Great, another Microsoft-proprietary extention. String address 0xEE is used\r
-                                          by Windows for "OS Descriptors", which in this case allows us to indicate that\r
-                                          our device is Sideshow compatible. Most people would be happy using the normal\r
-                                          0xFF 0x?? 0x?? Class/Subclass/Protocol values like the USBIF intended. */\r
-                                          \r
+                                       /* A Microsoft-proprietary extention. String address 0xEE is used by Windows for\r
+                                          "OS Descriptors", which in this case allows us to indicate that our device is\r
+                                          Sideshow compatible regardless of VID/PID values. */\r
                                        Address = (void*)&OSDescriptorString;\r
                                        Size    = pgm_read_byte(&OSDescriptorString.Header.Size);\r
                                        break;\r
index f2890ef..6369036 100644 (file)
                #include <LUFA/Drivers/Peripheral/SerialStream.h>\r
 \r
        /* Macros: */\r
+               /** Device control request for used in the Microsoft OS Descriptor for retrieving the OS Feature\r
+                *  descriptors of the device\r
+                */\r
                #define REQ_GetOSFeatureDescriptor        0x01\r
                \r
+               /** Descriptor index for a Microsoft Proprietary Extended Device Compatibility descriptor */\r
                #define EXTENDED_COMPAT_ID_DESCRIPTOR     0x0004\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+               #define LEDMASK_USB_NOTREADY              LEDS_LED1\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+               #define LEDMASK_USB_ENUMERATING          (LEDS_LED2 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+               #define LEDMASK_USB_READY                (LEDS_LED2 | LEDS_LED4)\r
 \r
                /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               #define LEDMASK_USB_ERROR                (LEDS_LED1 | LEDS_LED3)\r
                \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
index 9e7b2d6..cda03c0 100644 (file)
                 *\r
                 *  \param[in] freq  Required audio sampling frequency in HZ\r
                 */\r
-               #define SAMPLE_FREQ(freq)  {LowWord: ((uint32_t)freq & 0x00FFFF), HighByte: (((uint32_t)freq >> 16) & 0x0000FF)}\r
+               #define SAMPLE_FREQ(freq)  {LowWord: ((uint32_t)(freq) & 0x00FFFF), HighByte: (((uint32_t)(freq) >> 16) & 0x0000FF)}\r
                \r
                /** Mask for the attributes parameter of an Audio class specific Endpoint descriptor, indicating that the endpoint\r
                 *  accepts only filled endpoint packets of audio samples.\r
                #define EP_ACCEPTS_SMALL_PACKETS     (0 << 7)\r
 \r
                /** Endpoint number of the Audio isochronous streaming data endpoint. */\r
-               #define AUDIO_STREAM_EPNUM       1\r
+               #define AUDIO_STREAM_EPNUM           1\r
                \r
                /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires\r
                 *  at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller\r
index 0f2bb65..958e69e 100644 (file)
                 *\r
                 *  \param[in] freq  Required audio sampling frequency in HZ\r
                 */\r
-               #define SAMPLE_FREQ(freq)  {LowWord: ((uint32_t)freq & 0x00FFFF), HighByte: (((uint32_t)freq >> 16) & 0x0000FF)}\r
+               #define SAMPLE_FREQ(freq)  {LowWord: ((uint32_t)(freq) & 0x00FFFF), HighByte: (((uint32_t)(freq) >> 16) & 0x0000FF)}\r
                \r
                /** Mask for the attributes parameter of an Audio class specific Endpoint descriptor, indicating that the endpoint\r
                 *  accepts only filled endpoint packets of audio samples.\r
index 55ab6b2..d83dd79 100644 (file)
 \r
        /* Macros: */\r
                /** CDC Class specific request to get the current virtual serial port configuration settings. */\r
-               #define REQ_GetLineEncoding          0x21\r
+               #define REQ_GetLineEncoding       0x21\r
 \r
                /** CDC Class specific request to set the current virtual serial port configuration settings. */\r
-               #define REQ_SetLineEncoding          0x20\r
+               #define REQ_SetLineEncoding       0x20\r
 \r
                /** CDC Class specific request to set the current virtual serial port handshake line states. */\r
-               #define REQ_SetControlLineState      0x22\r
+               #define REQ_SetControlLineState   0x22\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index da3d4ac..80379ee 100644 (file)
                        \r
        /* Macros: */\r
                /** HID Class specific request to get the next HID report from the device. */\r
-               #define REQ_GetReport      0x01\r
+               #define REQ_GetReport             0x01\r
 \r
                /** HID Class specific request to send the next HID report to the device. */\r
-               #define REQ_SetReport      0x09\r
+               #define REQ_SetReport             0x09\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index db280ee..bf339fe 100644 (file)
@@ -52,7 +52,7 @@
 \r
        /* Macros: */\r
                /** HID Class specific request to get the next HID report from the device. */\r
-               #define REQ_GetReport   0x01\r
+               #define REQ_GetReport             0x01\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 576e080..889b6f9 100644 (file)
 \r
        /* Macros: */\r
                /** Idle period indicating that reports should be sent only when the inputs have changed */\r
-               #define HID_IDLE_CHANGESONLY   0\r
+               #define HID_IDLE_CHANGESONLY      0\r
 \r
                /** HID Class specific request to get the next HID report from the device. */\r
-               #define REQ_GetReport          0x01\r
+               #define REQ_GetReport             0x01\r
 \r
                /** HID Class specific request to get the idle timeout period of the device. */\r
-               #define REQ_GetIdle            0x02\r
+               #define REQ_GetIdle               0x02\r
 \r
                /** HID Class specific request to send the next HID report to the device. */\r
-               #define REQ_SetReport          0x09\r
+               #define REQ_SetReport             0x09\r
 \r
                /** HID Class specific request to set the idle timeout period of the device. */\r
-               #define REQ_SetIdle            0x0A\r
+               #define REQ_SetIdle               0x0A\r
 \r
                /** HID Class specific request to get the current HID protocol in use, either report or boot. */\r
-               #define REQ_GetProtocol        0x03\r
+               #define REQ_GetProtocol           0x03\r
 \r
                /** HID Class specific request to set the current HID protocol in use, either report or boot. */\r
-               #define REQ_SetProtocol        0x0B\r
+               #define REQ_SetProtocol           0x0B\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 57e152b..c939bdf 100644 (file)
                \r
        /* Macros: */\r
                /** HID Class specific request to get the next HID report from the device. */\r
-               #define REQ_GetReport      0x01\r
+               #define REQ_GetReport             0x01\r
 \r
                /** HID Class specific request to send the next HID report to the device. */\r
-               #define REQ_SetReport      0x09\r
+               #define REQ_SetReport             0x09\r
 \r
                /** HID Class specific request to get the current HID protocol in use, either report or boot. */\r
-               #define REQ_GetProtocol    0x03\r
+               #define REQ_GetProtocol           0x03\r
 \r
                /** HID Class specific request to set the current HID protocol in use, either report or boot. */\r
-               #define REQ_SetProtocol    0x0B\r
+               #define REQ_SetProtocol           0x0B\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 3e7a06d..992d54c 100644 (file)
@@ -65,7 +65,7 @@
                 *\r
                 *  \param[in] channel  MIDI channel number to address\r
                 */\r
-               #define MIDI_CHANNEL(channel)     (channel - 1)\r
+               #define MIDI_CHANNEL(channel)    ((channel) - 1)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index cfba56d..e906a4c 100644 (file)
@@ -42,9 +42,9 @@
                #include "MassStorage.h"\r
                #include "Descriptors.h"\r
 \r
-               #include <LUFA/Common/Common.h>              // Function Attribute, Atomic, Debug and ISR Macros\r
-               #include <LUFA/Drivers/USB/USB.h>            // USB Functionality\r
-               #include <LUFA/Drivers/Board/Dataflash.h>    // Dataflash chip driver\r
+               #include <LUFA/Common/Common.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/Board/Dataflash.h>\r
 \r
        /* Preprocessor Checks: */\r
                #if (DATAFLASH_PAGE_SIZE % 16)\r
index f642deb..93a4942 100644 (file)
@@ -40,9 +40,9 @@
                #include <avr/io.h>\r
                #include <avr/pgmspace.h>\r
 \r
-               #include <LUFA/Common/Common.h>              // Function Attribute, Atomic, Debug and ISR Macros\r
-               #include <LUFA/Drivers/USB/USB.h>            // USB Functionality\r
-               #include <LUFA/Drivers/Board/LEDs.h>         // LEDs driver\r
+               #include <LUFA/Common/Common.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
 \r
                #include "MassStorage.h"\r
                #include "Descriptors.h"\r
                 *  \param[in] acode  New SCSI additional sense key to set the additional sense code to\r
                 *  \param[in] aqual  New SCSI additional sense key qualifier to set the additional sense qualifier code to\r
                 */\r
-               #define SCSI_SET_SENSE(key, acode, aqual)  MACROS{ SenseData.SenseKey = key;              \\r
-                                                                  SenseData.AdditionalSenseCode = acode; \\r
-                                                                  SenseData.AdditionalSenseQualifier = aqual; }MACROE\r
+               #define SCSI_SET_SENSE(key, acode, aqual)  MACROS{ SenseData.SenseKey = (key);              \\r
+                                                                  SenseData.AdditionalSenseCode = (acode); \\r
+                                                                  SenseData.AdditionalSenseQualifier = (aqual); }MACROE\r
 \r
                /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */\r
-               #define DATA_READ         true\r
+               #define DATA_READ           true\r
 \r
                /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be written to the storage medium. */\r
-               #define DATA_WRITE        false\r
+               #define DATA_WRITE          false\r
 \r
                /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a Block Media device. */\r
-               #define DEVICE_TYPE_BLOCK 0x00\r
+               #define DEVICE_TYPE_BLOCK   0x00\r
                \r
                /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a CD-ROM device. */\r
-               #define DEVICE_TYPE_CDROM 0x05\r
+               #define DEVICE_TYPE_CDROM   0x05\r
 \r
        /* Type Defines: */\r
                /** Type define for a SCSI response structure to a SCSI INQUIRY command. For details of the\r
index 65407c8..05dbe75 100644 (file)
@@ -94,7 +94,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
        /* Type defines: */\r
                /** Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */\r
index 698fe47..3296f5c 100644 (file)
 \r
        /* Macros: */\r
                /** Idle period indicating that reports should be sent only when the inputs have changed */\r
-               #define HID_IDLE_CHANGESONLY 0\r
+               #define HID_IDLE_CHANGESONLY      0\r
        \r
                /** HID Class specific request to get the next HID report from the device. */\r
-               #define REQ_GetReport        0x01\r
+               #define REQ_GetReport             0x01\r
 \r
                /** HID Class specific request to get the idle timeout period of the device. */\r
-               #define REQ_GetIdle          0x02\r
+               #define REQ_GetIdle               0x02\r
 \r
                /** HID Class specific request to send the next HID report to the device. */\r
-               #define REQ_SetReport        0x09\r
+               #define REQ_SetReport             0x09\r
 \r
                /** HID Class specific request to set the idle timeout period of the device. */\r
-               #define REQ_SetIdle          0x0A\r
+               #define REQ_SetIdle               0x0A\r
 \r
                /** HID Class specific request to get the current HID protocol in use, either report or boot. */\r
-               #define REQ_GetProtocol      0x03\r
+               #define REQ_GetProtocol           0x03\r
 \r
                /** HID Class specific request to set the current HID protocol in use, either report or boot. */\r
-               #define REQ_SetProtocol      0x0B\r
+               #define REQ_SetProtocol           0x0B\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 3ae8966..0f6d9e6 100644 (file)
@@ -74,7 +74,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
        /* Type Defines: */\r
                /** Type define for a RNDIS notification message, for transmission to the RNDIS host via the notification\r
index d8abc12..ee62354 100644 (file)
                #define CONTROL_LINE_IN_OVERRUNERROR (1 << 6)\r
                \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+               #define LEDMASK_USB_NOTREADY         LEDS_LED1\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+               #define LEDMASK_USB_ENUMERATING     (LEDS_LED2 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+               #define LEDMASK_USB_READY           (LEDS_LED2 | LEDS_LED4)\r
 \r
                /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               #define LEDMASK_USB_ERROR           (LEDS_LED1 | LEDS_LED3)\r
 \r
        /* Type Defines: */\r
                /** Type define for the virtual serial port line encoding settings, for storing the current USART configuration\r
index 4c3539f..45646ce 100644 (file)
@@ -65,7 +65,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
                \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
 \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
index 24e42eb..7621927 100644 (file)
@@ -64,7 +64,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
                \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
 \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
index ea87648..48dc939 100644 (file)
@@ -64,7 +64,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
                \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
 \r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
index e943687..6b59289 100644 (file)
@@ -32,7 +32,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "BluetoothHost.h"\r
                \r
index 46edbdb..9de8bc1 100644 (file)
@@ -32,7 +32,7 @@
 #define _DEVICEDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "BluetoothHost.h"\r
                \r
index 4861610..7cc1576 100644 (file)
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "GenericHIDHost.h"\r
                \r
        /* Macros: */\r
                /** Interface Class value for the Human Interface Device class */\r
-               #define HID_CLASS                 0x03\r
+               #define HID_CLASS                   0x03\r
 \r
                /** Maximum size of a device configuration descriptor which can be processed by the host, in bytes */\r
                #define MAX_CONFIG_DESCRIPTOR_SIZE  512\r
index 1c6210a..bae5369 100644 (file)
                \r
        /* Macros: */\r
                /** Pipe number for the HID data IN pipe */\r
-               #define HID_DATA_IN_PIPE                 1\r
+               #define HID_DATA_IN_PIPE          1\r
                \r
                /** Pipe number for the HID data OUT pipe */\r
-               #define HID_DATA_OUT_PIPE                2\r
+               #define HID_DATA_OUT_PIPE         2\r
 \r
                /** HID Class specific request to send a HID report to the device. */\r
-               #define REQ_SetReport                    0x09\r
+               #define REQ_SetReport             0x09\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 6268430..7fcd511 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "HIDReport.h"\r
                \r
index 73c5938..32e2626 100644 (file)
@@ -54,7 +54,7 @@
 \r
        /* Macros: */\r
                /** Pipe number for the joystick report data pipe */\r
-               #define JOYSTICK_DATAPIPE              1\r
+               #define JOYSTICK_DATAPIPE         1\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 6dd9366..07d3b2e 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "KeyboardHost.h"\r
                \r
index 9c6575c..2a6d56d 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "HIDReport.h"\r
                \r
index 8453bb6..461c2a0 100644 (file)
@@ -49,7 +49,7 @@
 \r
        /* Macros: */\r
                /** Pipe number for the keyboard report data pipe */\r
-               #define KEYBOARD_DATAPIPE              1\r
+               #define KEYBOARD_DATAPIPE         1\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 8a49e2b..1ca24d4 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>      // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "MIDIHost.h"\r
                \r
index 2f311a5..e51faa4 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "MassStorageHost.h"\r
                \r
index c7bb7c7..9ce419b 100644 (file)
@@ -64,7 +64,7 @@
                #define COMMAND_DIRECTION_DATA_IN           (1 << 7)\r
                \r
                /** Timeout period between the issuing of a CBW to a device, and the reception of the first packet */\r
-               #define COMMAND_DATA_TIMEOUT_MS             2000\r
+               #define COMMAND_DATA_TIMEOUT_MS             10000\r
 \r
                /** Pipe number of the Mass Storage data IN pipe */\r
                #define MASS_STORE_DATA_IN_PIPE             1\r
index e9f0278..663b720 100644 (file)
@@ -70,7 +70,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
        /* Function Prototypes: */\r
                void MassStorage_Task(void);\r
index 6a194b1..1acf205 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "MouseHost.h"\r
                \r
index 6a31c65..207ac0c 100644 (file)
                \r
        /* Macros: */\r
                /** Pipe number for the mouse data IN pipe */\r
-               #define MOUSE_DATAPIPE              1\r
+               #define MOUSE_DATAPIPE            1\r
                \r
                /** HID Class Specific request to set the report protocol mode */\r
-               #define REQ_SetProtocol             0x0B\r
+               #define REQ_SetProtocol           0x0B\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index 7b33c74..fe04197 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "HIDReport.h"\r
                \r
index 92782cf..9183cca 100644 (file)
@@ -54,7 +54,7 @@
 \r
        /* Macros: */\r
                /** Pipe number for the mouse report data pipe */\r
-               #define MOUSE_DATAPIPE              1\r
+               #define MOUSE_DATAPIPE            1\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
index db7a9fe..b5008c1 100644 (file)
@@ -67,7 +67,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
        \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
        \r
        /* Function Prototypes: */\r
                void EVENT_USB_Host_DeviceAttached(void);\r
index 4279c1a..d2d1596 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "RNDISEthernetHost.h"\r
                \r
index 47e5c24..480c113 100644 (file)
@@ -67,7 +67,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
                                \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
 \r
        /* Type Defines: */\r
                /** Type define for a RNDIS notification message, for transmission to the RNDIS host via the notification\r
index 24dd066..946edb1 100644 (file)
@@ -37,7 +37,7 @@
 #define _CONFIGDESCRIPTOR_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "StillImageHost.h"\r
                \r
index 6ac70fc..b38f5c1 100644 (file)
@@ -37,7 +37,7 @@
 #define _STILL_IMAGE_COMMANDS_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include "PIMACodes.h"\r
 \r
                 *\r
                 *  \param[in] chars  Total number of Unicode characters in the string\r
                 */\r
-               #define UNICODE_STRING_LENGTH(chars)   (chars << 1)\r
+               #define UNICODE_STRING_LENGTH(chars)   ((chars) << 1)\r
 \r
                /** Timeout period between the issuing of a command to a device, and the reception of the first packet */\r
-               #define COMMAND_DATA_TIMEOUT_MS        5000\r
+               #define COMMAND_DATA_TIMEOUT_MS        10000\r
                \r
                /** Used in the DataLength field of a PIMA container, to give the total container size in bytes for\r
                 *  a command container.\r
@@ -66,7 +66,7 @@
                 *  \param[in] params  Number of parameters which are to be sent in the Param field of the container\r
                 */\r
                #define PIMA_COMMAND_SIZE(params)      ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + \\r
-                                                       (params * sizeof(PIMA_SendBlock.Params[0])))\r
+                                                       ((params) * sizeof(PIMA_SendBlock.Params[0])))\r
 \r
                /** Used in the DataLength field of a PIMA container, to give the total container size in bytes for\r
                 *  a data container.\r
index 89956e0..23077c4 100644 (file)
@@ -66,7 +66,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
        /* Function Prototypes: */\r
                void StillImage_Task(void);\r
index f65298a..22f4b10 100644 (file)
                                #define Dataflash_GetSelectedChip()          (DATAFLASH_CHIPCS_PORT & DATAFLASH_CHIPCS_MASK)\r
 \r
                                #define Dataflash_SelectChip(mask)   MACROS{ DATAFLASH_CHIPCS_PORT = ((DATAFLASH_CHIPCS_PORT \\r
-                                                                                                                        & ~DATAFLASH_CHIPCS_MASK) | mask);              }MACROE\r
+                                                                                                                        & ~DATAFLASH_CHIPCS_MASK) | (mask));            }MACROE\r
                                \r
                                #define Dataflash_DeselectChip()             Dataflash_SelectChip(DATAFLASH_NO_CHIP)\r
                        #endif\r
index 584172f..aa70733 100644 (file)
                        #define COMMAND_DIRECTION_DATA_OUT     (0 << 7)\r
                        #define COMMAND_DIRECTION_DATA_IN      (1 << 7)\r
                        \r
-                       #define COMMAND_DATA_TIMEOUT_MS        2000\r
+                       #define COMMAND_DATA_TIMEOUT_MS        10000\r
 \r
                        #define MS_FOUND_DATAPIPE_IN           (1 << 0)\r
                        #define MS_FOUND_DATAPIPE_OUT          (1 << 1)\r
index 4478931..f89b59e 100644 (file)
                        #define SI_FOUND_DATAPIPE_IN           (1 << 1)\r
                        #define SI_FOUND_DATAPIPE_OUT          (1 << 2)\r
 \r
-                       #define COMMAND_DATA_TIMEOUT_MS        5000\r
+                       #define COMMAND_DATA_TIMEOUT_MS        10000\r
                \r
                /* Function Prototypes: */\r
                        #if defined(INCLUDE_FROM_SI_CLASS_HOST_C)\r
index 2862944..9b46c09 100644 (file)
                        #endif\r
                        \r
                        /** Macro to calculate the power value for the device descriptor, from a given number of milliamps. */\r
-                       #define USB_CONFIG_POWER_MA(mA)           (mA >> 1)\r
+                       #define USB_CONFIG_POWER_MA(mA)           ((mA) >> 1)\r
 \r
                        /** Macro to calculate the Unicode length of a string with a given number of Unicode characters.\r
                         *  Should be used in string descriptor's headers for giving the string descriptor's byte length.\r
                         */\r
-                       #define USB_STRING_LEN(str)               (sizeof(USB_Descriptor_Header_t) + (str << 1))\r
+                       #define USB_STRING_LEN(str)               (sizeof(USB_Descriptor_Header_t) + ((str) << 1))\r
                        \r
                        /** Macro to encode a given four digit floating point version number (e.g. 01.23) into Binary Coded\r
                         *  Decimal format for descriptor fields requiring BCD encoding, such as the USB version number in the\r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
                /* Macros: */\r
-                       #define VERSION_TENS(x)                   (int)(x / 10)\r
-                       #define VERSION_ONES(x)                   (int)(x - (10 * VERSION_TENS(x)))\r
-                       #define VERSION_TENTHS(x)                 (int)((x - (int)x) * 10)\r
-                       #define VERSION_HUNDREDTHS(x)             (int)(((x - (int)x) * 100) - (10 * VERSION_TENTHS(x)))\r
+                       #define VERSION_TENS(x)                   (int)((x) / 10)\r
+                       #define VERSION_ONES(x)                   (int)((x) - (10 * VERSION_TENS(x)))\r
+                       #define VERSION_TENTHS(x)                 (int)(((x) - (int)(x)) * 10)\r
+                       #define VERSION_HUNDREDTHS(x)             (int)((((x) - (int)(x)) * 100) - (10 * VERSION_TENTHS(x)))\r
        #endif\r
        \r
        /* Disable C linkage for C++ Compilers: */\r
index cc06015..4c9b717 100644 (file)
                        #endif\r
                        \r
                /* Macros: */\r
-                       #define HOST_TASK_NONBLOCK_WAIT(duration, nextstate) MACROS{USB_HostState = HOST_STATE_WaitForDevice; WaitMSRemaining = duration; PostWaitState = nextstate; }MACROE\r
+                       #define HOST_TASK_NONBLOCK_WAIT(duration, nextstate) MACROS{ USB_HostState = HOST_STATE_WaitForDevice; \\r
+                                                                                    WaitMSRemaining = (duration);             \\r
+                                                                                    PostWaitState = (nextstate);        }MACROE\r
        #endif\r
        \r
        /* Disable C linkage for C++ Compilers: */\r
index b9122e4..eb09a0d 100644 (file)
                                #if !defined(CONTROL_ONLY_DEVICE)\r
                                        #define Endpoint_SelectEndpoint(epnum)    MACROS{ UENUM = (epnum); }MACROE\r
                                #else\r
-                                       #define Endpoint_SelectEndpoint(epnum)    (void)epnum\r
+                                       #define Endpoint_SelectEndpoint(epnum)    (void)(epnum)\r
                                #endif\r
 \r
                                #define Endpoint_ResetFIFO(epnum)             MACROS{ UERST = (1 << (epnum)); UERST = 0; }MACROE\r
index 1fdd966..f7af9a1 100644 (file)
@@ -53,6 +53,9 @@
   *  - Fixed HID Parser not distributing the Usage Min and Usage Max values across an array of report items\r
   *  - Fixed Mass Storage Host Class driver and Low Level demo not clearing the error condition if an attached device returns a\r
   *    STALL to a GET MAX LUN request (thanks to Martin Luxen)\r
+  *  - Fixed TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting\r
+  *  - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow \r
+  *    devices from timing out the data pipes\r
   *\r
   *  \section Sec_ChangeLog091122 Version 091122\r
   *\r
index 987ce3d..3267afc 100644 (file)
   *      -# Write LUFA tutorials\r
   *  - Demos/Projects\r
   *      -# Multiple-Report HID device\r
-  *      -# Device/Host bridge\r
+  *      -# Device/Host USB bridge\r
+  *      -# Finish BluetoothHost demo\r
+  *      -# Finish MIDI class Bootloader\r
+  *      -# Finish SideShow demo\r
+  *      -# Finish StandaloneProgrammer project\r
   *  - Ports\r
   *      -# AVR32 UC3B series microcontrollers\r
   *      -# Atmel ARM7 series microcontrollers\r
index d40f951..c620300 100644 (file)
@@ -57,7 +57,7 @@
 
        /* Macros: */\r
                /** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing */
-               #define PROGRAMMER_ID                   "AVRISP_MK2"\r
+               #define PROGRAMMER_ID             "AVRISP_MK2"\r
 \r
                /** Timeout in milliseconds of target busy-wait loops waiting for a command to complete */\r
                #define TARGET_BUSY_TIMEOUT_MS    240\r
index 744ad01..828e3ea 100644 (file)
@@ -68,7 +68,7 @@
                #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY         (LEDS_LED2)\r
+               #define LEDMASK_USB_BUSY          LEDS_LED2\r
                \r
        /* External Variables: */\r
                extern FILE DiskStream;\r
index a16d313..26dd077 100644 (file)
@@ -287,7 +287,7 @@ void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength)
                USB_ControlRequest = (USB_Request_Header_t)\r
                        {\r
                                .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
-                               .bRequest      = 0x09,\r
+                               .bRequest      = REQ_SetReport,\r
                                .wValue        = 0x02,\r
                                .wIndex        = 0x01,\r
                                .wLength       = ReportLength,\r
index 86fbe86..e92fe74 100644 (file)
                \r
        /* Macros: */\r
                /** Pipe number for the HID data IN pipe */\r
-               #define HID_DATA_IN_PIPE                 1\r
+               #define HID_DATA_IN_PIPE          1\r
                \r
                /** Pipe number for the HID data OUT pipe */\r
-               #define HID_DATA_OUT_PIPE                2\r
+               #define HID_DATA_OUT_PIPE         2\r
 \r
                /** HID Class specific request to send a HID report to the device. */\r
-               #define REQ_SetReport                    0x09\r
+               #define REQ_SetReport             0x09\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                #define LEDMASK_USB_NOTREADY      LEDS_LED1\r