diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c index f09d3f136329e75fa409ecaef8a757cb3a6a43e9..90cbaf0bcaee480872f442cc85cb2d02475b06c3 100644 --- a/Demos/Device/ClassDriver/CDC/CDC.c +++ b/Demos/Device/ClassDriver/CDC/CDC.c @@ -44,16 +44,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface = { .Config = { - .ControlInterfaceNumber = 0, + .ControlInterfaceNumber = 0, - .DataINEndpointNumber = CDC_TX_EPNUM, - .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointNumber = CDC_TX_EPNUM, + .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = CDC_RX_EPNUM, - .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointNumber = CDC_RX_EPNUM, + .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointDoubleBank = false, - .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, - .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, + .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointDoubleBank = false, }, }; diff --git a/Demos/Device/ClassDriver/CDCMouse/CDCMouse.c b/Demos/Device/ClassDriver/CDCMouse/CDCMouse.c index 1102b7e813f22130feea214e34a85d54f3248291..b625327fb4d218b075b9430c097c1782a3f91fa4 100644 --- a/Demos/Device/ClassDriver/CDCMouse/CDCMouse.c +++ b/Demos/Device/ClassDriver/CDCMouse/CDCMouse.c @@ -44,16 +44,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface = { .Config = { - .ControlInterfaceNumber = 0, + .ControlInterfaceNumber = 0, - .DataINEndpointNumber = CDC_TX_EPNUM, - .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointNumber = CDC_TX_EPNUM, + .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = CDC_RX_EPNUM, - .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointNumber = CDC_RX_EPNUM, + .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointDoubleBank = false, - .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, - .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, + .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointDoubleBank = false, }, }; @@ -68,13 +71,14 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = MOUSE_EPNUM, - .ReportINEndpointSize = MOUSE_EPSIZE, + .ReportINEndpointNumber = MOUSE_EPNUM, + .ReportINEndpointSize = MOUSE_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevMouseHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), + .PrevReportINBuffer = PrevMouseHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), }, }; diff --git a/Demos/Device/ClassDriver/DualCDC/DualCDC.c b/Demos/Device/ClassDriver/DualCDC/DualCDC.c index 5ee3c4d059c50ca4da2f70ef5855a82e27e134fe..000d18b9affe279d30673015dacc67b7f904f450 100644 --- a/Demos/Device/ClassDriver/DualCDC/DualCDC.c +++ b/Demos/Device/ClassDriver/DualCDC/DualCDC.c @@ -45,16 +45,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial1_CDC_Interface = { .Config = { - .ControlInterfaceNumber = 0, + .ControlInterfaceNumber = 0, - .DataINEndpointNumber = CDC1_TX_EPNUM, - .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointNumber = CDC1_TX_EPNUM, + .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = CDC1_RX_EPNUM, - .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointNumber = CDC1_RX_EPNUM, + .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointDoubleBank = false, - .NotificationEndpointNumber = CDC1_NOTIFICATION_EPNUM, - .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointNumber = CDC1_NOTIFICATION_EPNUM, + .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointDoubleBank = false, }, }; @@ -67,16 +70,19 @@ USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface = { .Config = { - .ControlInterfaceNumber = 2, + .ControlInterfaceNumber = 2, - .DataINEndpointNumber = CDC2_TX_EPNUM, - .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointNumber = CDC2_TX_EPNUM, + .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = CDC2_RX_EPNUM, - .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointNumber = CDC2_RX_EPNUM, + .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointDoubleBank = false, - .NotificationEndpointNumber = CDC2_NOTIFICATION_EPNUM, - .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointNumber = CDC2_NOTIFICATION_EPNUM, + .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointDoubleBank = false, }, }; diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c index c27558b9ea9c26b692f185c40770aa0fa613a5cf..bd75e4ec1cfa2d47436e5083ae43161445914b4f 100644 --- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c +++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c @@ -55,13 +55,14 @@ USB_ClassInfo_HID_Device_t Generic_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = GENERIC_IN_EPNUM, - .ReportINEndpointSize = GENERIC_EPSIZE, + .ReportINEndpointNumber = GENERIC_IN_EPNUM, + .ReportINEndpointSize = GENERIC_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevHIDReportBuffer), + .PrevReportINBuffer = PrevHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevHIDReportBuffer), }, }; diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c index b18b7ebc87fe83a9902eddaa400fb826b70445b0..36a74a218ee15213bcb160da8f1c13df9c275825 100644 --- a/Demos/Device/ClassDriver/Joystick/Joystick.c +++ b/Demos/Device/ClassDriver/Joystick/Joystick.c @@ -47,13 +47,14 @@ USB_ClassInfo_HID_Device_t Joystick_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = JOYSTICK_EPNUM, - .ReportINEndpointSize = JOYSTICK_EPSIZE, + .ReportINEndpointNumber = JOYSTICK_EPNUM, + .ReportINEndpointSize = JOYSTICK_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevJoystickHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevJoystickHIDReportBuffer), + .PrevReportINBuffer = PrevJoystickHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevJoystickHIDReportBuffer), }, }; diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c index e609d7acb27e8fc699743a5b72873568ba6151ed..ea373a802a8c8e0d5f72125fb2fda02c05fa35c1 100644 --- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c +++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c @@ -48,13 +48,14 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = KEYBOARD_EPNUM, - .ReportINEndpointSize = KEYBOARD_EPSIZE, + .ReportINEndpointNumber = KEYBOARD_EPNUM, + .ReportINEndpointSize = KEYBOARD_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), + .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), }, }; diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index 5ac5b8d85d2913fbc876b75fa124ffa8d9911cd2..77aa2a91aa2f69ce2523295e214139dac3dfe110 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -52,13 +52,14 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = KEYBOARD_IN_EPNUM, - .ReportINEndpointSize = HID_EPSIZE, + .ReportINEndpointNumber = KEYBOARD_IN_EPNUM, + .ReportINEndpointSize = HID_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), + .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), }, }; diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.c b/Demos/Device/ClassDriver/MIDI/MIDI.c index d50a254a24c849fc86debcbee62fae7dba6ae28f..b7048278711a3eb5bcbfcb4519ca42cf09a4f15f 100644 --- a/Demos/Device/ClassDriver/MIDI/MIDI.c +++ b/Demos/Device/ClassDriver/MIDI/MIDI.c @@ -46,11 +46,13 @@ USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface = { .StreamingInterfaceNumber = 1, - .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM, - .DataINEndpointSize = MIDI_STREAM_EPSIZE, + .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM, + .DataINEndpointSize = MIDI_STREAM_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM, - .DataOUTEndpointSize = MIDI_STREAM_EPSIZE, + .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM, + .DataOUTEndpointSize = MIDI_STREAM_EPSIZE, + .DataOUTEndpointDoubleBank = false, }, }; diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.c b/Demos/Device/ClassDriver/MassStorage/MassStorage.c index 4092680c48c66ef0a96234fa4455bad356793859..3895555d1b555e8e6b2e027fd74052abb1525b89 100644 --- a/Demos/Device/ClassDriver/MassStorage/MassStorage.c +++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.c @@ -44,15 +44,17 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM, - .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE, + .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM, + .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM, - .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE, + .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM, + .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE, + .DataOUTEndpointDoubleBank = false, - .TotalLUNs = TOTAL_LUNS, + .TotalLUNs = TOTAL_LUNS, }, }; diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c index 033bc56650d3ae04924edd84fecf01289aac9d5c..4e68f5c974bb5ea473c8d890fcd4cede97dbb51e 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c @@ -36,6 +36,28 @@ */ #include "MassStorageKeyboard.h" + +/** LUFA Mass Storage Class driver interface configuration and state information. This structure is + * passed to all Mass Storage Class driver functions, so that multiple instances of the same class + * within a device can be differentiated from one another. + */ +USB_ClassInfo_MS_Device_t Disk_MS_Interface = + { + .Config = + { + .InterfaceNumber = 0, + + .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM, + .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE, + .DataINEndpointDoubleBank = false, + + .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM, + .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE, + .DataOUTEndpointDoubleBank = false, + + .TotalLUNs = TOTAL_LUNS, + }, + }; /** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */ uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)]; @@ -48,35 +70,16 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface = { .Config = { - .InterfaceNumber = 1, + .InterfaceNumber = 1, - .ReportINEndpointNumber = KEYBOARD_EPNUM, - .ReportINEndpointSize = KEYBOARD_EPSIZE, + .ReportINEndpointNumber = KEYBOARD_EPNUM, + .ReportINEndpointSize = KEYBOARD_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), + .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), }, }; - -/** LUFA Mass Storage Class driver interface configuration and state information. This structure is - * passed to all Mass Storage Class driver functions, so that multiple instances of the same class - * within a device can be differentiated from one another. - */ -USB_ClassInfo_MS_Device_t Disk_MS_Interface = - { - .Config = - { - .InterfaceNumber = 0, - - .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM, - .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE, - - .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM, - .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE, - - .TotalLUNs = TOTAL_LUNS, - }, - }; /** Main program entry point. This routine contains the overall program flow, including initial * setup of all components and the main program loop. diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c index d54aecfaa584641d173175ae8016345088866035..c53d429a48ecd3d92e53d95263cca0c75b0a0cb7 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.c +++ b/Demos/Device/ClassDriver/Mouse/Mouse.c @@ -47,13 +47,14 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = MOUSE_EPNUM, - .ReportINEndpointSize = MOUSE_EPSIZE, + .ReportINEndpointNumber = MOUSE_EPNUM, + .ReportINEndpointSize = MOUSE_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevMouseHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), + .PrevReportINBuffer = PrevMouseHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), }, }; diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c index 905f4efd0aad9fb5048b3b75aaf1a5d3167727cf..03daec9d5f5ee925a23e87814d167fc90145600e 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c @@ -44,19 +44,22 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface = { .Config = { - .ControlInterfaceNumber = 0, + .ControlInterfaceNumber = 0, - .DataINEndpointNumber = CDC_TX_EPNUM, - .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointNumber = CDC_TX_EPNUM, + .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointDoubleBank = false, - .DataOUTEndpointNumber = CDC_RX_EPNUM, - .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointNumber = CDC_RX_EPNUM, + .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointDoubleBank = false, - .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, - .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, + .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointDoubleBank = false, - .AdapterVendorDescription = "LUFA RNDIS Demo Adapter", - .AdapterMACAddress = {ADAPTER_MAC_ADDRESS}, + .AdapterVendorDescription = "LUFA RNDIS Demo Adapter", + .AdapterMACAddress = {ADAPTER_MAC_ADDRESS}, }, }; diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c index 33bf7dc2056cf3fcf5e2063946e0d713c3ddf0be..47a191350c84370c85da0697cdf3520f7db27106 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c @@ -47,13 +47,14 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = MOUSE_EPNUM, - .ReportINEndpointSize = MOUSE_EPSIZE, + .ReportINEndpointNumber = MOUSE_EPNUM, + .ReportINEndpointSize = MOUSE_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevMouseHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), + .PrevReportINBuffer = PrevMouseHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), }, }; diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index 92f4f22fa8b9bc0df0c81bc4f229a03bfb1418f5..6f64dbdfa3f428e79582eeeeb54ee38f214fabc4 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -57,13 +57,9 @@ /* Includes: */ #include <avr/io.h> - #include <stdio.h> - #include <avr/version.h> - + #include "FunctionAttributes.h" #include "BoardTypes.h" - - #include <alloca.h> /* Public Interface - May be used in end-application: */ /* Macros: */ diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h index 0d8e0ec88979bf9295a62a6a242842a60324eb1e..0200cf42835e3e6e72678a3611ddf571ea080e59 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.h +++ b/LUFA/Drivers/USB/Class/Device/Audio.h @@ -66,21 +66,21 @@ const struct { uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this - * structure controls. + * structure controls */ uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming Audio Streaming data, if available - * (zero if unused). + * (zero if unused) */ uint16_t DataINEndpointSize; /**< Size in bytes of the incomming Audio Streaming data endpoint, if available - * (zero if unused). + * (zero if unused) */ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing Audio Streaming data, if available - * (zero if unused). + * (zero if unused) */ uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing Audio Streaming data endpoint, if available - * (zero if unused). + * (zero if unused) */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * <b>must</b> be set or the interface will fail to enumerate and operate correctly. diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index c968d7f0c70dd462c53c8679f79e3804ae8afcd7..dfee2bb1be7d4c3dfdcb29073355da6f255820ef 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -91,21 +91,21 @@ bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo) if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.DataINEndpointSize, - ENDPOINT_BANK_SINGLE))) + CDCInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_OUT, CDCInterfaceInfo->Config.DataOUTEndpointSize, - ENDPOINT_BANK_SINGLE))) + CDCInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.NotificationEndpointSize, - ENDPOINT_BANK_SINGLE))) + CDCInterfaceInfo->Config.NotificationEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index 3e7dbb08f47642763acfdc29ade8b186d8498f5f..c3304f099e74d543657a2f05154235c8525a357d 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -69,12 +69,15 @@ uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */ uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */ + bool DataINEndpointDoubleBank; /** Indicates if the CDC interface's IN data endpoint should use double banking */ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */ uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */ + bool DataOUTEndpointDoubleBank; /** Indicates if the CDC interface's OUT data endpoint should use double banking */ uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */ uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */ + bool NotificationEndpointDoubleBank; /** Indicates if the CDC interface's notification endpoint should use double banking */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * <b>must</b> be set or the interface will fail to enumerate and operate correctly. */ diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c index 26f5697d2288b1613b4adb4900d2cd55cd3848a0..0bf1f70200ea27393216f9807365002ee96e1cad 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.c +++ b/LUFA/Drivers/USB/Class/Device/HID.c @@ -134,7 +134,8 @@ bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfac HIDInterfaceInfo->State.IdleCount = 500; if (!(Endpoint_ConfigureEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber, EP_TYPE_INTERRUPT, - ENDPOINT_DIR_IN, HIDInterfaceInfo->Config.ReportINEndpointSize, ENDPOINT_BANK_SINGLE))) + ENDPOINT_DIR_IN, HIDInterfaceInfo->Config.ReportINEndpointSize, + HIDInterfaceInfo->Config.ReportINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h index 545b38d140094337c2a120caa845e3407e2eb118..7bcc263a87058abd9b9cb729ece11e834841c1b1 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.h +++ b/LUFA/Drivers/USB/Class/Device/HID.h @@ -73,6 +73,7 @@ uint8_t ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint */ uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint */ + bool ReportINEndpointDoubleBank; /** Indicates if the HID interface's IN report endpoint should use double banking */ void* PrevReportINBuffer; /**< Pointer to a buffer where the previously created HID input report can be * stored by the driver, for comparison purposes to detect report changes that diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.c b/LUFA/Drivers/USB/Class/Device/MIDI.c index eede4806ba503d1693c621b87ee126503e773ae3..2685ab0aee11d2863b760a2eb91433607ded0953 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.c +++ b/LUFA/Drivers/USB/Class/Device/MIDI.c @@ -46,7 +46,7 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter { if (!(Endpoint_ConfigureEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_IN, MIDIInterfaceInfo->Config.DataINEndpointSize, - ENDPOINT_BANK_SINGLE))) + MIDIInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } @@ -56,7 +56,7 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter { if (!(Endpoint_ConfigureEndpoint(MIDIInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_OUT, MIDIInterfaceInfo->Config.DataOUTEndpointSize, - ENDPOINT_BANK_SINGLE))) + MIDIInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index c7f67e20c1bcbe760d6ca43a483af1b1a9d20c1d..c17b72ad71233c701b4268156fc83e4d4519b554 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -70,9 +70,11 @@ uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming MIDI data, if available (zero if unused) */ uint16_t DataINEndpointSize; /**< Size in bytes of the incomming MIDI data endpoint, if available (zero if unused) */ + bool DataINEndpointDoubleBank; /** Indicates if the MIDI interface's IN data endpoint should use double banking */ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused) */ uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused) */ + bool DataOUTEndpointDoubleBank; /** Indicates if the MIDI interface's IN data endpoint should use double banking */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * <b>must</b> be set or the interface will fail to enumerate and operate correctly. */ diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c index 04c63fca736395c674eba8ef110bbaf2018b768b..fce8643864bb3d47d5d111885b313e16f68a22c9 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c @@ -78,14 +78,14 @@ bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceIn if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_IN, MSInterfaceInfo->Config.DataINEndpointSize, - ENDPOINT_BANK_SINGLE))) + MSInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_OUT, MSInterfaceInfo->Config.DataOUTEndpointSize, - ENDPOINT_BANK_SINGLE))) + MSInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h index 4dca793c5d4c16f98184f04233f1a2d5651e16cb..3de5fd39644959709a1a0a62398d50f14243f68e 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h @@ -69,9 +69,11 @@ uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint */ uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint */ + bool DataINEndpointDoubleBank; /** Indicates if the Mass Storage interface's IN data endpoint should use double banking */ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint */ uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint */ + bool DataOUTEndpointDoubleBank; /** Indicates if the Mass Storage interface's OUT data endpoint should use double banking */ uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface */ } Config; /**< Config data for the USB class interface within the device. All elements in this section diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.c b/LUFA/Drivers/USB/Class/Device/RNDIS.c index 09352143c6ef6a7476b22f165dbfadd57f0909ad..8ba46c7ac175e5ba38c2e8c21ff33da68dd544e7 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.c +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.c @@ -116,21 +116,21 @@ bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISIn if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.DataINEndpointSize, - ENDPOINT_BANK_SINGLE))) + RNDISInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK, ENDPOINT_DIR_OUT, RNDISInterfaceInfo->Config.DataOUTEndpointSize, - ENDPOINT_BANK_SINGLE))) + RNDISInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.NotificationEndpointSize, - ENDPOINT_BANK_SINGLE))) + RNDISInterfaceInfo->Config.NotificationEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE))) { return false; } diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h index 7d7a0f5b932dd4fd414fc5ddcc6158fafbc63b34..7521f074167bb197a76146642c652be2c657ac9a 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h @@ -70,12 +70,15 @@ uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */ uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */ + bool DataINEndpointDoubleBank; /** Indicates if the RNDIS interface's IN data endpoint should use double banking */ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */ uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */ + bool DataOUTEndpointDoubleBank; /** Indicates if the RNDIS interface's OUT data endpoint should use double banking */ uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */ uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */ + bool NotificationEndpointDoubleBank; /** Indicates if the RNDIS interface's notification endpoint should use double banking */ char* AdapterVendorDescription; /**< String description of the adapter vendor */ MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */ diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 52f01fac7f7541b31350e9ae8e2aefbcc7654b3f..9fe00ee482d7b6949d0cdc8c23c8d32e54d5b4e9 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -18,6 +18,7 @@ * - Added new Joystick Host ClassDriver and LowLevel demos * - Added new Printer Host mode Class driver * - Added new Printer Host mode ClassDriver demo + * - Added optional support for double banked endpoints in the Device mode Class drivers * * <b>Changed:</b> * - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt index 1e2eaa731f58b670757d2585b4047e40eaa1b219..447c34b5dbe76efc8d14df5a4de788e55a566404 100644 --- a/LUFA/ManPages/FutureChanges.txt +++ b/LUFA/ManPages/FutureChanges.txt @@ -24,6 +24,7 @@ * - Add RNDIS Host Class driver * - Add unit testing to APIs * - Add board overviews + * - Add resume interrupt support * - Make new demos * -# Keyboard/Mouse Dual Class Host * -# Multiple-Report HID device