Add optional double-banking support to the Device mode Class Drivers, on a per-endpoi...
[pub/lufa.git] / Demos / Device / ClassDriver / MassStorageKeyboard / MassStorageKeyboard.c
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