Add optional double-banking support to the Device mode Class Drivers, on a per-endpoi...
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 6 Nov 2009 13:43:18 +0000 (13:43 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 6 Nov 2009 13:43:18 +0000 (13:43 +0000)
27 files changed:
Demos/Device/ClassDriver/CDC/CDC.c
Demos/Device/ClassDriver/CDCMouse/CDCMouse.c
Demos/Device/ClassDriver/DualCDC/DualCDC.c
Demos/Device/ClassDriver/GenericHID/GenericHID.c
Demos/Device/ClassDriver/Joystick/Joystick.c
Demos/Device/ClassDriver/Keyboard/Keyboard.c
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
Demos/Device/ClassDriver/MIDI/MIDI.c
Demos/Device/ClassDriver/MassStorage/MassStorage.c
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
Demos/Device/ClassDriver/Mouse/Mouse.c
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
LUFA/Common/Common.h
LUFA/Drivers/USB/Class/Device/Audio.h
LUFA/Drivers/USB/Class/Device/CDC.c
LUFA/Drivers/USB/Class/Device/CDC.h
LUFA/Drivers/USB/Class/Device/HID.c
LUFA/Drivers/USB/Class/Device/HID.h
LUFA/Drivers/USB/Class/Device/MIDI.c
LUFA/Drivers/USB/Class/Device/MIDI.h
LUFA/Drivers/USB/Class/Device/MassStorage.c
LUFA/Drivers/USB/Class/Device/MassStorage.h
LUFA/Drivers/USB/Class/Device/RNDIS.c
LUFA/Drivers/USB/Class/Device/RNDIS.h
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/FutureChanges.txt

index f09d3f1..90cbaf0 100644 (file)
@@ -44,16 +44,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
        {\r
                .Config =\r
                        {\r
-                               .ControlInterfaceNumber     = 0,\r
+                               .ControlInterfaceNumber         = 0,\r
 \r
-                               .DataINEndpointNumber       = CDC_TX_EPNUM,\r
-                               .DataINEndpointSize         = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
+                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank       = false,\r
 \r
-                               .DataOUTEndpointNumber      = CDC_RX_EPNUM,\r
-                               .DataOUTEndpointSize        = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
+                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank      = false,\r
 \r
-                               .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank = false,\r
                        },\r
        };\r
 \r
index 1102b7e..b625327 100644 (file)
@@ -44,16 +44,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
        {\r
                .Config =\r
                        {\r
-                               .ControlInterfaceNumber     = 0,\r
+                               .ControlInterfaceNumber         = 0,\r
 \r
-                               .DataINEndpointNumber       = CDC_TX_EPNUM,\r
-                               .DataINEndpointSize         = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
+                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank       = false,\r
 \r
-                               .DataOUTEndpointNumber      = CDC_RX_EPNUM,\r
-                               .DataOUTEndpointSize        = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
+                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank      = false,\r
 \r
-                               .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank = false,\r
                        },\r
        };\r
 \r
@@ -68,13 +71,14 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber                = 0,\r
 \r
-                               .ReportINEndpointNumber  = MOUSE_EPNUM,\r
-                               .ReportINEndpointSize    = MOUSE_EPSIZE,\r
+                               .ReportINEndpointNumber         = MOUSE_EPNUM,\r
+                               .ReportINEndpointSize           = MOUSE_EPSIZE,\r
+                               .ReportINEndpointDoubleBank     = false,\r
 \r
-                               .PrevReportINBuffer      = PrevMouseHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevMouseHIDReportBuffer),\r
+                               .PrevReportINBuffer             = PrevMouseHIDReportBuffer,\r
+                               .PrevReportINBufferSize         = sizeof(PrevMouseHIDReportBuffer),\r
                        },\r
        };\r
 \r
index 5ee3c4d..000d18b 100644 (file)
@@ -45,16 +45,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial1_CDC_Interface =
        {\r
                .Config =\r
                        {\r
-                               .ControlInterfaceNumber     = 0,\r
+                               .ControlInterfaceNumber           = 0,\r
 \r
-                               .DataINEndpointNumber       = CDC1_TX_EPNUM,\r
-                               .DataINEndpointSize         = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointNumber             = CDC1_TX_EPNUM,\r
+                               .DataINEndpointSize               = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank         = false,\r
 \r
-                               .DataOUTEndpointNumber      = CDC1_RX_EPNUM,\r
-                               .DataOUTEndpointSize        = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointNumber            = CDC1_RX_EPNUM,\r
+                               .DataOUTEndpointSize              = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank        = false,\r
 \r
-                               .NotificationEndpointNumber = CDC1_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointNumber       = CDC1_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize         = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank   = false,\r
                        },\r
        };\r
 \r
@@ -67,16 +70,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface =
        {\r
                .Config =\r
                        {\r
-                               .ControlInterfaceNumber     = 2,\r
+                               .ControlInterfaceNumber           = 2,\r
 \r
-                               .DataINEndpointNumber       = CDC2_TX_EPNUM,\r
-                               .DataINEndpointSize         = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointNumber             = CDC2_TX_EPNUM,\r
+                               .DataINEndpointSize               = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank         = false,\r
 \r
-                               .DataOUTEndpointNumber      = CDC2_RX_EPNUM,\r
-                               .DataOUTEndpointSize        = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointNumber            = CDC2_RX_EPNUM,\r
+                               .DataOUTEndpointSize              = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank        = false,\r
 \r
-                               .NotificationEndpointNumber = CDC2_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointNumber       = CDC2_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize         = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank   = false,\r
                        },\r
        };\r
 \r
index c27558b..bd75e4e 100644 (file)
@@ -55,13 +55,14 @@ USB_ClassInfo_HID_Device_t Generic_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber              = 0,\r
 \r
-                               .ReportINEndpointNumber  = GENERIC_IN_EPNUM,\r
-                               .ReportINEndpointSize    = GENERIC_EPSIZE,\r
+                               .ReportINEndpointNumber       = GENERIC_IN_EPNUM,\r
+                               .ReportINEndpointSize         = GENERIC_EPSIZE,\r
+                               .ReportINEndpointDoubleBank   = false,\r
                                \r
-                               .PrevReportINBuffer      = PrevHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevHIDReportBuffer),\r
+                               .PrevReportINBuffer           = PrevHIDReportBuffer,\r
+                               .PrevReportINBufferSize       = sizeof(PrevHIDReportBuffer),\r
                        },\r
        };\r
 \r
index b18b7eb..36a74a2 100644 (file)
@@ -47,13 +47,14 @@ USB_ClassInfo_HID_Device_t Joystick_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber              = 0,\r
 \r
-                               .ReportINEndpointNumber  = JOYSTICK_EPNUM,\r
-                               .ReportINEndpointSize    = JOYSTICK_EPSIZE,\r
+                               .ReportINEndpointNumber       = JOYSTICK_EPNUM,\r
+                               .ReportINEndpointSize         = JOYSTICK_EPSIZE,\r
+                               .ReportINEndpointDoubleBank   = false,\r
 \r
-                               .PrevReportINBuffer      = PrevJoystickHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevJoystickHIDReportBuffer),\r
+                               .PrevReportINBuffer           = PrevJoystickHIDReportBuffer,\r
+                               .PrevReportINBufferSize       = sizeof(PrevJoystickHIDReportBuffer),\r
                        },\r
        };\r
 \r
index e609d7a..ea373a8 100644 (file)
@@ -48,13 +48,14 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber              = 0,\r
 \r
-                               .ReportINEndpointNumber  = KEYBOARD_EPNUM,\r
-                               .ReportINEndpointSize    = KEYBOARD_EPSIZE,\r
+                               .ReportINEndpointNumber       = KEYBOARD_EPNUM,\r
+                               .ReportINEndpointSize         = KEYBOARD_EPSIZE,\r
+                               .ReportINEndpointDoubleBank   = false,\r
 \r
-                               .PrevReportINBuffer      = PrevKeyboardHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevKeyboardHIDReportBuffer),\r
+                               .PrevReportINBuffer           = PrevKeyboardHIDReportBuffer,\r
+                               .PrevReportINBufferSize       = sizeof(PrevKeyboardHIDReportBuffer),\r
                        },\r
     };\r
 \r
index 5ac5b8d..77aa2a9 100644 (file)
@@ -52,13 +52,14 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber              = 0,\r
 \r
-                               .ReportINEndpointNumber  = KEYBOARD_IN_EPNUM,\r
-                               .ReportINEndpointSize    = HID_EPSIZE,\r
+                               .ReportINEndpointNumber       = KEYBOARD_IN_EPNUM,\r
+                               .ReportINEndpointSize         = HID_EPSIZE,\r
+                               .ReportINEndpointDoubleBank   = false,\r
 \r
-                               .PrevReportINBuffer      = PrevKeyboardHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevKeyboardHIDReportBuffer),\r
+                               .PrevReportINBuffer           = PrevKeyboardHIDReportBuffer,\r
+                               .PrevReportINBufferSize       = sizeof(PrevKeyboardHIDReportBuffer),\r
                        },\r
        };\r
        \r
index d50a254..b704827 100644 (file)
@@ -46,11 +46,13 @@ USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
                        {\r
                                .StreamingInterfaceNumber = 1,\r
 \r
-                               .DataINEndpointNumber     = MIDI_STREAM_IN_EPNUM,\r
-                               .DataINEndpointSize       = MIDI_STREAM_EPSIZE,\r
+                               .DataINEndpointNumber      = MIDI_STREAM_IN_EPNUM,\r
+                               .DataINEndpointSize        = MIDI_STREAM_EPSIZE,\r
+                               .DataINEndpointDoubleBank  = false,\r
 \r
-                               .DataOUTEndpointNumber    = MIDI_STREAM_OUT_EPNUM,\r
-                               .DataOUTEndpointSize      = MIDI_STREAM_EPSIZE,\r
+                               .DataOUTEndpointNumber     = MIDI_STREAM_OUT_EPNUM,\r
+                               .DataOUTEndpointSize       = MIDI_STREAM_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank = false,\r
                        },\r
        };\r
 \r
index 4092680..3895555 100644 (file)
@@ -44,15 +44,17 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber        = 0,\r
+                               .InterfaceNumber           = 0,\r
 \r
-                               .DataINEndpointNumber   = MASS_STORAGE_IN_EPNUM,\r
-                               .DataINEndpointSize     = MASS_STORAGE_IO_EPSIZE,\r
+                               .DataINEndpointNumber      = MASS_STORAGE_IN_EPNUM,\r
+                               .DataINEndpointSize        = MASS_STORAGE_IO_EPSIZE,\r
+                               .DataINEndpointDoubleBank  = false,\r
 \r
-                               .DataOUTEndpointNumber  = MASS_STORAGE_OUT_EPNUM,\r
-                               .DataOUTEndpointSize    = MASS_STORAGE_IO_EPSIZE,\r
+                               .DataOUTEndpointNumber     = MASS_STORAGE_OUT_EPNUM,\r
+                               .DataOUTEndpointSize       = MASS_STORAGE_IO_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank = false,\r
 \r
-                               .TotalLUNs              = TOTAL_LUNS,\r
+                               .TotalLUNs                 = TOTAL_LUNS,\r
                        },\r
        };\r
 \r
index 033bc56..4e68f5c 100644 (file)
  */\r
 \r
 #include "MassStorageKeyboard.h"\r
+       \r
+/** LUFA Mass Storage Class driver interface configuration and state information. This structure is\r
+ *  passed to all Mass Storage Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another.\r
+ */\r
+USB_ClassInfo_MS_Device_t Disk_MS_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .InterfaceNumber           = 0,\r
+\r
+                               .DataINEndpointNumber      = MASS_STORAGE_IN_EPNUM,\r
+                               .DataINEndpointSize        = MASS_STORAGE_IO_EPSIZE,\r
+                               .DataINEndpointDoubleBank  = false,\r
+\r
+                               .DataOUTEndpointNumber     = MASS_STORAGE_OUT_EPNUM,\r
+                               .DataOUTEndpointSize       = MASS_STORAGE_IO_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank = false,\r
+\r
+                               .TotalLUNs                 = TOTAL_LUNS,\r
+                       },\r
+       };\r
 \r
 /** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */\r
 uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];\r
@@ -48,35 +70,16 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 1,\r
+                               .InterfaceNumber              = 1,\r
 \r
-                               .ReportINEndpointNumber  = KEYBOARD_EPNUM,\r
-                               .ReportINEndpointSize    = KEYBOARD_EPSIZE,\r
+                               .ReportINEndpointNumber       = KEYBOARD_EPNUM,\r
+                               .ReportINEndpointSize         = KEYBOARD_EPSIZE,\r
+                               .ReportINEndpointDoubleBank   = false,\r
 \r
-                               .PrevReportINBuffer      = PrevKeyboardHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevKeyboardHIDReportBuffer),\r
+                               .PrevReportINBuffer           = PrevKeyboardHIDReportBuffer,\r
+                               .PrevReportINBufferSize       = sizeof(PrevKeyboardHIDReportBuffer),\r
                        },\r
     };\r
-       \r
-/** LUFA Mass Storage Class driver interface configuration and state information. This structure is\r
- *  passed to all Mass Storage Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another.\r
- */\r
-USB_ClassInfo_MS_Device_t Disk_MS_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .InterfaceNumber        = 0,\r
-\r
-                               .DataINEndpointNumber   = MASS_STORAGE_IN_EPNUM,\r
-                               .DataINEndpointSize     = MASS_STORAGE_IO_EPSIZE,\r
-\r
-                               .DataOUTEndpointNumber  = MASS_STORAGE_OUT_EPNUM,\r
-                               .DataOUTEndpointSize    = MASS_STORAGE_IO_EPSIZE,\r
-\r
-                               .TotalLUNs              = TOTAL_LUNS,\r
-                       },\r
-       };\r
 \r
 /** Main program entry point. This routine contains the overall program flow, including initial\r
  *  setup of all components and the main program loop.\r
index d54aecf..c53d429 100644 (file)
@@ -47,13 +47,14 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber              = 0,\r
 \r
-                               .ReportINEndpointNumber  = MOUSE_EPNUM,\r
-                               .ReportINEndpointSize    = MOUSE_EPSIZE,\r
+                               .ReportINEndpointNumber       = MOUSE_EPNUM,\r
+                               .ReportINEndpointSize         = MOUSE_EPSIZE,\r
+                               .ReportINEndpointDoubleBank   = false,\r
 \r
-                               .PrevReportINBuffer      = PrevMouseHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevMouseHIDReportBuffer),\r
+                               .PrevReportINBuffer           = PrevMouseHIDReportBuffer,\r
+                               .PrevReportINBufferSize       = sizeof(PrevMouseHIDReportBuffer),\r
                        },\r
        };\r
 \r
index 905f4ef..03daec9 100644 (file)
@@ -44,19 +44,22 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface =
        {\r
                .Config =\r
                        {\r
-                               .ControlInterfaceNumber     = 0,\r
+                               .ControlInterfaceNumber         = 0,\r
 \r
-                               .DataINEndpointNumber       = CDC_TX_EPNUM,\r
-                               .DataINEndpointSize         = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
+                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank       = false,\r
 \r
-                               .DataOUTEndpointNumber      = CDC_RX_EPNUM,\r
-                               .DataOUTEndpointSize        = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
+                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank      = false,\r
 \r
-                               .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank = false,\r
                                \r
-                               .AdapterVendorDescription   = "LUFA RNDIS Demo Adapter",\r
-                               .AdapterMACAddress          = {ADAPTER_MAC_ADDRESS},\r
+                               .AdapterVendorDescription       = "LUFA RNDIS Demo Adapter",\r
+                               .AdapterMACAddress              = {ADAPTER_MAC_ADDRESS},\r
                        },\r
        };\r
 \r
index 33bf7dc..47a1913 100644 (file)
@@ -47,13 +47,14 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface =
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber         = 0,\r
+                               .InterfaceNumber            = 0,\r
 \r
-                               .ReportINEndpointNumber  = MOUSE_EPNUM,\r
-                               .ReportINEndpointSize    = MOUSE_EPSIZE,\r
+                               .ReportINEndpointNumber     = MOUSE_EPNUM,\r
+                               .ReportINEndpointSize       = MOUSE_EPSIZE,\r
+                               .ReportINEndpointDoubleBank = false,\r
 \r
-                               .PrevReportINBuffer      = PrevMouseHIDReportBuffer,\r
-                               .PrevReportINBufferSize  = sizeof(PrevMouseHIDReportBuffer),\r
+                               .PrevReportINBuffer         = PrevMouseHIDReportBuffer,\r
+                               .PrevReportINBufferSize     = sizeof(PrevMouseHIDReportBuffer),\r
                        },\r
        };\r
        \r
index 92f4f22..6f64dbd 100644 (file)
 \r
        /* Includes: */\r
                #include <avr/io.h>\r
-               #include <stdio.h>\r
-               #include <avr/version.h>\r
-               \r
+       \r
                #include "FunctionAttributes.h"\r
                #include "BoardTypes.h"\r
-               \r
-               #include <alloca.h>\r
 \r
        /* Public Interface - May be used in end-application: */\r
                /* Macros: */           \r
index 0d8e0ec..0200cf4 100644 (file)
                                const struct\r
                                {\r
                                        uint8_t  StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this\r
-                                                                                                               *   structure controls.\r
+                                                                                                               *   structure controls\r
                                                                                                                */\r
 \r
                                        uint8_t  DataINEndpointNumber; /**< Endpoint number of the incomming Audio Streaming data, if available\r
-                                                                                                       *   (zero if unused).\r
+                                                                                                       *   (zero if unused)\r
                                                                                                        */\r
                                        uint16_t DataINEndpointSize; /**< Size in bytes of the incomming Audio Streaming data endpoint, if available\r
-                                                                                                 *   (zero if unused).\r
+                                                                                                 *   (zero if unused)\r
                                                                                                  */\r
 \r
                                        uint8_t  DataOUTEndpointNumber; /**< Endpoint number of the outgoing Audio Streaming data, if available\r
-                                                                                                        *   (zero if unused).\r
+                                                                                                        *   (zero if unused)\r
                                                                                                         */\r
                                        uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing Audio Streaming data endpoint, if available\r
-                                                                                                  *   (zero if unused).\r
+                                                                                                  *   (zero if unused)\r
                                                                                                   */                   \r
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
                                           *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
index c968d7f..dfee2bb 100644 (file)
@@ -91,21 +91,21 @@ bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
 \r
        if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,\r
                                                                 ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.DataINEndpointSize,\r
-                                                                ENDPOINT_BANK_SINGLE)))\r
+                                                                CDCInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
 \r
        if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,\r
                                         ENDPOINT_DIR_OUT, CDCInterfaceInfo->Config.DataOUTEndpointSize,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
+                                        CDCInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
 \r
        if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT,\r
                                         ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.NotificationEndpointSize,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
+                                        CDCInterfaceInfo->Config.NotificationEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
index 3e7dbb0..c3304f0 100644 (file)
 \r
                                        uint8_t  DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
                                        uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
+                                       bool     DataINEndpointDoubleBank; /** Indicates if the CDC interface's IN data endpoint should use double banking */\r
 \r
                                        uint8_t  DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
                                        uint16_t DataOUTEndpointSize;  /**< Size in bytes of the CDC interface's OUT data endpoint */\r
+                                       bool     DataOUTEndpointDoubleBank; /** Indicates if the CDC interface's OUT data endpoint should use double banking */\r
 \r
                                        uint8_t  NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
                                        uint16_t NotificationEndpointSize;  /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
+                                       bool     NotificationEndpointDoubleBank; /** Indicates if the CDC interface's notification endpoint should use double banking */\r
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
                                           *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
                                           */\r
index 26f5697..0bf1f70 100644 (file)
@@ -134,7 +134,8 @@ bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfac
        HIDInterfaceInfo->State.IdleCount = 500;\r
 \r
        if (!(Endpoint_ConfigureEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber, EP_TYPE_INTERRUPT,\r
-                                                                        ENDPOINT_DIR_IN, HIDInterfaceInfo->Config.ReportINEndpointSize, ENDPOINT_BANK_SINGLE)))\r
+                                                                        ENDPOINT_DIR_IN, HIDInterfaceInfo->Config.ReportINEndpointSize,\r
+                                                                        HIDInterfaceInfo->Config.ReportINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
index 545b38d..7bcc263 100644 (file)
@@ -73,6 +73,7 @@
 \r
                                        uint8_t  ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint */\r
                                        uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint */                                  \r
+                                       bool     ReportINEndpointDoubleBank; /** Indicates if the HID interface's IN report endpoint should use double banking */\r
                                        \r
                                        void*    PrevReportINBuffer; /**< Pointer to a buffer where the previously created HID input report can be\r
                                                                      *  stored by the driver, for comparison purposes to detect report changes that\r
index eede480..2685ab0 100644 (file)
@@ -46,7 +46,7 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter
        {\r
                if (!(Endpoint_ConfigureEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,\r
                                                                                 ENDPOINT_DIR_IN, MIDIInterfaceInfo->Config.DataINEndpointSize,\r
-                                                                                ENDPOINT_BANK_SINGLE)))\r
+                                                                                MIDIInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
                {\r
                        return false;\r
                }\r
@@ -56,7 +56,7 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter
        {\r
                if (!(Endpoint_ConfigureEndpoint(MIDIInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,\r
                                                                                 ENDPOINT_DIR_OUT, MIDIInterfaceInfo->Config.DataOUTEndpointSize,\r
-                                                                                ENDPOINT_BANK_SINGLE)))\r
+                                                                                MIDIInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
                {\r
                        return false;\r
                }\r
index c7f67e2..c17b72a 100644 (file)
 \r
                                        uint8_t  DataINEndpointNumber; /**< Endpoint number of the incomming MIDI data, if available (zero if unused) */\r
                                        uint16_t DataINEndpointSize; /**< Size in bytes of the incomming MIDI data endpoint, if available (zero if unused) */\r
+                                       bool     DataINEndpointDoubleBank; /** Indicates if the MIDI interface's IN data endpoint should use double banking */\r
 \r
                                        uint8_t  DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused) */\r
                                        uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused) */\r
+                                       bool     DataOUTEndpointDoubleBank; /** Indicates if the MIDI interface's IN data endpoint should use double banking */\r
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
                                           *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
                                           */                                                                    \r
index 04c63fc..fce8643 100644 (file)
@@ -78,14 +78,14 @@ bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
 \r
        if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,\r
                                                                 ENDPOINT_DIR_IN, MSInterfaceInfo->Config.DataINEndpointSize,\r
-                                                                ENDPOINT_BANK_SINGLE)))\r
+                                                                MSInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
 \r
        if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,\r
                                         ENDPOINT_DIR_OUT, MSInterfaceInfo->Config.DataOUTEndpointSize,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
+                                        MSInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
index 4dca793..3de5fd3 100644 (file)
 \r
                                        uint8_t  DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint */\r
                                        uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint */\r
+                                       bool     DataINEndpointDoubleBank; /** Indicates if the Mass Storage interface's IN data endpoint should use double banking */\r
 \r
                                        uint8_t  DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint */\r
                                        uint16_t DataOUTEndpointSize;  /**< Size in bytes of the Mass Storage interface's OUT data endpoint */\r
+                                       bool     DataOUTEndpointDoubleBank; /** Indicates if the Mass Storage interface's OUT data endpoint should use double banking */\r
 \r
                                        uint8_t  TotalLUNs; /**< Total number of logical drives in the Mass Storage interface */\r
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
index 0935214..8ba46c7 100644 (file)
@@ -116,21 +116,21 @@ bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISIn
 \r
        if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,\r
                                                                 ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.DataINEndpointSize,\r
-                                                                ENDPOINT_BANK_SINGLE)))\r
+                                                                RNDISInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
 \r
        if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,\r
                                         ENDPOINT_DIR_OUT, RNDISInterfaceInfo->Config.DataOUTEndpointSize,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
+                                        RNDISInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
 \r
        if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT,\r
                                         ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.NotificationEndpointSize,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
+                                        RNDISInterfaceInfo->Config.NotificationEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))\r
        {\r
                return false;\r
        }\r
index 7d7a0f5..7521f07 100644 (file)
 \r
                                        uint8_t  DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
                                        uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
+                                       bool     DataINEndpointDoubleBank; /** Indicates if the RNDIS interface's IN data endpoint should use double banking */\r
 \r
                                        uint8_t  DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
                                        uint16_t DataOUTEndpointSize;  /**< Size in bytes of the CDC interface's OUT data endpoint */\r
+                                       bool     DataOUTEndpointDoubleBank; /** Indicates if the RNDIS interface's OUT data endpoint should use double banking */\r
 \r
                                        uint8_t  NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
                                        uint16_t NotificationEndpointSize;  /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
+                                       bool     NotificationEndpointDoubleBank; /** Indicates if the RNDIS interface's notification endpoint should use double banking */\r
                                        \r
                                        char*         AdapterVendorDescription; /**< String description of the adapter vendor */\r
                                        MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */\r
index 52f01fa..9fe00ee 100644 (file)
@@ -18,6 +18,7 @@
   *  - Added new Joystick Host ClassDriver and LowLevel demos\r
   *  - Added new Printer Host mode Class driver\r
   *  - Added new Printer Host mode ClassDriver demo\r
+  *  - Added optional support for double banked endpoints in the Device mode Class drivers\r
   *\r
   *  <b>Changed:</b>\r
   *  - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library\r
index 1e2eaa7..447c34b 100644 (file)
@@ -24,6 +24,7 @@
   *  - Add RNDIS Host Class driver\r
   *  - Add unit testing to APIs\r
   *  - Add board overviews\r
+  *  - Add resume interrupt support\r
   *  - Make new demos\r
   *      -# Keyboard/Mouse Dual Class Host\r
   *      -# Multiple-Report HID device\r