Add descriptor class, subclass and protocol constants to the class drivers, modify all demos to use them where possible.

Move out private/internal host class driver constants to the common class driver headers, so that they can be used in the Low Level host mode demos.

Ensure all demos, projects and bootloaders use the class driver constants where possible to minimise code repetition.
pull/1469/head
Dean Camera 14 years ago
parent b37d77eab3
commit 55538dcef3

@ -47,9 +47,9 @@ USB_Descriptor_Device_t DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(02.00), .USBSpecification = VERSION_BCD(02.00),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x01, .SubClass = AUDIO_CSCP_ControlSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_ControlProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(02.00), .USBSpecification = VERSION_BCD(02.00),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x01, .SubClass = AUDIO_CSCP_ControlSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_ControlProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xEF, .Class = USB_CSCP_IADDeviceClass,
.SubClass = 0x02, .SubClass = USB_CSCP_IADDeviceSubclass,
.Protocol = 0x01, .Protocol = USB_CSCP_IADDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -105,9 +105,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.FirstInterfaceIndex = 0, .FirstInterfaceIndex = 0,
.TotalInterfaces = 2, .TotalInterfaces = 2,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.IADStrIndex = NO_DESCRIPTOR .IADStrIndex = NO_DESCRIPTOR
}, },
@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -172,9 +172,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -206,9 +206,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.FirstInterfaceIndex = 2, .FirstInterfaceIndex = 2,
.TotalInterfaces = 2, .TotalInterfaces = 2,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.IADStrIndex = NO_DESCRIPTOR .IADStrIndex = NO_DESCRIPTOR
}, },
@ -222,9 +222,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -273,9 +273,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -73,9 +73,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x00, .SubClass = HID_CSCP_NonBootSubclass,
.Protocol = HID_BOOTP_NonBootProtocol, .Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x00, .SubClass = HID_CSCP_NonBootSubclass,
.Protocol = HID_BOOTP_NonBootProtocol, .Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -89,9 +89,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -137,9 +137,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_KeyboardBootProtocol, .Protocol = HID_CSCP_KeyboardBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -122,9 +122,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -170,9 +170,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_KeyboardBootProtocol, .Protocol = HID_CSCP_KeyboardBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -207,9 +207,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_MouseBootProtocol, .Protocol = HID_CSCP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x01, .SubClass = AUDIO_CSCP_ControlSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_ControlProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -123,9 +123,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x03, .SubClass = AUDIO_CSCP_MIDIStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x08, .Class = MS_CSCP_MassStorageClass,
.SubClass = 0x06, .SubClass = MS_CSCP_SCSITransparentSubclass,
.Protocol = 0x50, .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -102,9 +102,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -150,9 +150,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x08, .Class = MS_CSCP_MassStorageClass,
.SubClass = 0x06, .SubClass = MS_CSCP_SCSITransparentSubclass,
.Protocol = 0x50, .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -186,9 +186,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_KeyboardBootProtocol, .Protocol = HID_CSCP_KeyboardBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_MouseBootProtocol, .Protocol = HID_CSCP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0xFF, .Protocol = CDC_CSCP_VendorSpecificProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -64,15 +64,15 @@
*/ */
typedef struct typedef struct
{ {
USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t CDC_CCI_Interface; USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
USB_Descriptor_Interface_t CDC_DCI_Interface; USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint; USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint; USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
} USB_Descriptor_Configuration_t; } USB_Descriptor_Configuration_t;
/* Function Prototypes: */ /* Function Prototypes: */

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -95,9 +95,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xEF, .Class = USB_CSCP_IADDeviceClass,
.SubClass = 0x02, .SubClass = USB_CSCP_IADDeviceSubclass,
.Protocol = 0x01, .Protocol = USB_CSCP_IADDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -141,9 +141,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.FirstInterfaceIndex = 0, .FirstInterfaceIndex = 0,
.TotalInterfaces = 2, .TotalInterfaces = 2,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.IADStrIndex = NO_DESCRIPTOR .IADStrIndex = NO_DESCRIPTOR
}, },
@ -157,9 +157,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -208,9 +208,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -244,9 +244,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_MouseBootProtocol, .Protocol = HID_CSCP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x01, .SubClass = AUDIO_CSCP_ControlSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_ControlProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x01, .SubClass = AUDIO_CSCP_ControlSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_ControlProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x02, .SubClass = AUDIO_CSCP_AudioStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xEF, .Class = USB_CSCP_IADDeviceClass,
.SubClass = 0x02, .SubClass = USB_CSCP_IADDeviceSubclass,
.Protocol = 0x01, .Protocol = USB_CSCP_IADDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -105,9 +105,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.FirstInterfaceIndex = 0, .FirstInterfaceIndex = 0,
.TotalInterfaces = 2, .TotalInterfaces = 2,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.IADStrIndex = NO_DESCRIPTOR .IADStrIndex = NO_DESCRIPTOR
}, },
@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -172,9 +172,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -206,9 +206,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.FirstInterfaceIndex = 2, .FirstInterfaceIndex = 2,
.TotalInterfaces = 2, .TotalInterfaces = 2,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.IADStrIndex = NO_DESCRIPTOR .IADStrIndex = NO_DESCRIPTOR
}, },
@ -222,9 +222,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -273,9 +273,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -73,9 +73,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x00, .SubClass = HID_CSCP_NonBootSubclass,
.Protocol = 0x00, .Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x00, .SubClass = HID_CSCP_NonBootSubclass,
.Protocol = 0x00, .Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -90,9 +90,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -138,9 +138,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = 0x01, .Protocol = HID_CSCP_KeyboardBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -123,9 +123,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = 0x01, .Protocol = HID_CSCP_KeyboardBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -218,9 +218,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = 0x02, .Protocol = HID_CSCP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x01, .SubClass = AUDIO_CSCP_ControlSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_ControlProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -123,9 +123,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x01, .Class = AUDIO_CSCP_AudioClass,
.SubClass = 0x03, .SubClass = AUDIO_CSCP_MIDIStreamingSubclass,
.Protocol = 0x00, .Protocol = AUDIO_CSCP_StreamingProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x08, .Class = MS_CSCP_MassStorageClass,
.SubClass = 0x06, .SubClass = MS_CSCP_SCSITransparentSubclass,
.Protocol = 0x50, .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = 0x02, .Protocol = HID_CSCP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0xFF, .Protocol = CDC_CSCP_VendorSpecificProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -41,7 +41,6 @@
#include <stdbool.h> #include <stdbool.h>
#include "RNDISEthernet.h" #include "RNDISEthernet.h"
#include "RNDISConstants.h"
#include "Ethernet.h" #include "Ethernet.h"
/* External Variables: */ /* External Variables: */

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = HID_BOOTP_MouseBootProtocol, .Protocol = HID_CSCP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,7 +47,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Host_Interface =
.DataINPipeNumber = 1, .DataINPipeNumber = 1,
.DataOUTPipeNumber = 2, .DataOUTPipeNumber = 2,
.HIDInterfaceProtocol = HID_BOOTP_MouseBootProtocol, .HIDInterfaceProtocol = HID_CSCP_MouseBootProtocol,
}, },
}; };

@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Joystick_HID_Interface =
.DataOUTPipeNumber = 2, .DataOUTPipeNumber = 2,
.DataOUTPipeDoubleBank = false, .DataOUTPipeDoubleBank = false,
.HIDInterfaceProtocol = HID_BOOTP_NonBootProtocol, .HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
.HIDParserData = &HIDReportInfo .HIDParserData = &HIDReportInfo
}, },

@ -50,7 +50,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface =
.DataOUTPipeNumber = 2, .DataOUTPipeNumber = 2,
.DataOUTPipeDoubleBank = false, .DataOUTPipeDoubleBank = false,
.HIDInterfaceProtocol = HID_BOOTP_KeyboardBootProtocol, .HIDInterfaceProtocol = HID_CSCP_KeyboardBootProtocol,
}, },
}; };

@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface =
.DataOUTPipeNumber = 2, .DataOUTPipeNumber = 2,
.DataOUTPipeDoubleBank = false, .DataOUTPipeDoubleBank = false,
.HIDInterfaceProtocol = HID_BOOTP_NonBootProtocol, .HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
.HIDParserData = &HIDReportInfo .HIDParserData = &HIDReportInfo
}, },

@ -50,7 +50,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Interface =
.DataOUTPipeNumber = 2, .DataOUTPipeNumber = 2,
.DataOUTPipeDoubleBank = false, .DataOUTPipeDoubleBank = false,
.HIDInterfaceProtocol = HID_BOOTP_MouseBootProtocol, .HIDInterfaceProtocol = HID_CSCP_MouseBootProtocol,
}, },
}; };

@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Interface =
.DataOUTPipeNumber = 2, .DataOUTPipeNumber = 2,
.DataOUTPipeDoubleBank = false, .DataOUTPipeDoubleBank = false,
.HIDInterfaceProtocol = HID_BOOTP_NonBootProtocol, .HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
.HIDParserData = &HIDReportInfo .HIDParserData = &HIDReportInfo
}, },

@ -139,7 +139,7 @@ uint8_t DComp_NextHIDInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the HID descriptor class, break out if correct class/protocol interface found */ /* Check the HID descriptor class, break out if correct class/protocol interface found */
if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CLASS) if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass)
{ {
/* Indicate that the descriptor being searched for has been found */ /* Indicate that the descriptor being searched for has been found */
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;

@ -42,9 +42,6 @@
#include "GenericHIDHost.h" #include "GenericHIDHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Human Interface Device class. */
#define HID_CLASS 0x03
/** Pipe number for the HID data IN pipe. */ /** Pipe number for the HID data IN pipe. */
#define HID_DATA_IN_PIPE 1 #define HID_DATA_IN_PIPE 1

@ -133,9 +133,8 @@ uint8_t DComp_NextJoystickInterface(void* CurrentDescriptor)
{ {
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the HID descriptor class, break out if correct class interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == JOYSTICK_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass))
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == JOYSTICK_PROTOCOL))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,12 +42,6 @@
#include "HIDReport.h" #include "HIDReport.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Human Interface Device class. */
#define JOYSTICK_CLASS 0x03
/** Interface Protocol value for a Boot Protocol Mouse compliant device. */
#define JOYSTICK_PROTOCOL 0x02
/** Pipe number for the joystick report data pipe. */ /** Pipe number for the joystick report data pipe. */
#define JOYSTICK_DATA_IN_PIPE 1 #define JOYSTICK_DATA_IN_PIPE 1

@ -119,8 +119,8 @@ uint8_t DComp_NextKeyboardInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == KEYBOARD_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == KEYBOARD_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == HID_CSCP_KeyboardBootProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,12 +42,6 @@
#include "KeyboardHost.h" #include "KeyboardHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Human Interface Device class. */
#define KEYBOARD_CLASS 0x03
/** Interface Protocol value for a Boot Protocol Keyboard compliant device. */
#define KEYBOARD_PROTOCOL 0x01
/** Pipe number for the keyboard data IN pipe. */ /** Pipe number for the keyboard data IN pipe. */
#define KEYBOARD_DATA_IN_PIPE 1 #define KEYBOARD_DATA_IN_PIPE 1

@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void)
uint16_t CurrConfigBytesRem; uint16_t CurrConfigBytesRem;
USB_Descriptor_Interface_t* HIDInterface = NULL; USB_Descriptor_Interface_t* HIDInterface = NULL;
USB_Descriptor_HID_t* HIDDescriptor = NULL; USB_HID_Descriptor_HID_t* HIDDescriptor = NULL;
USB_Descriptor_Endpoint_t* DataINEndpoint = NULL; USB_Descriptor_Endpoint_t* DataINEndpoint = NULL;
/* Retrieve the entire configuration descriptor into the allocated buffer */ /* Retrieve the entire configuration descriptor into the allocated buffer */
@ -95,7 +95,7 @@ uint8_t ProcessConfigurationDescriptor(void)
} }
/* Save the HID descriptor for later use */ /* Save the HID descriptor for later use */
HIDDescriptor = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_HID_t); HIDDescriptor = DESCRIPTOR_PCAST(CurrConfigLocation, USB_HID_Descriptor_HID_t);
/* Skip the remainder of the loop as we have not found an endpoint yet */ /* Skip the remainder of the loop as we have not found an endpoint yet */
continue; continue;
@ -133,9 +133,8 @@ uint8_t DComp_NextKeyboardInterface(void* CurrentDescriptor)
{ {
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the HID descriptor class, break out if correct class interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == KEYBOARD_CLASS) && if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass)
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == KEYBOARD_PROTOCOL))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,12 +42,6 @@
#include "HIDReport.h" #include "HIDReport.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Human Interface Device class. */
#define KEYBOARD_CLASS 0x03
/** Interface Protocol value for a Boot Protocol Keyboard compliant device. */
#define KEYBOARD_PROTOCOL 0x01
/** Pipe number for the keyboard report data pipe. */ /** Pipe number for the keyboard report data pipe. */
#define KEYBOARD_DATA_IN_PIPE 1 #define KEYBOARD_DATA_IN_PIPE 1

@ -51,7 +51,7 @@ uint8_t GetHIDReportData(void)
{ {
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE), .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
.bRequest = REQ_GetDescriptor, .bRequest = REQ_GetDescriptor,
.wValue = (DTYPE_Report << 8), .wValue = (HID_DTYPE_Report << 8),
.wIndex = 0, .wIndex = 0,
.wLength = HIDReportSize, .wLength = HIDReportSize,
}; };

@ -41,6 +41,10 @@
#include "KeyboardHostWithParser.h" #include "KeyboardHostWithParser.h"
/* Macros: */
/** HID Report Descriptor Usage Page value for a desktop keyboard. */
#define USAGE_PAGE_KEYBOARD 0x07
/* Enums: */ /* Enums: */
/** Enum for the possible return codes of the \ref GetHIDReportData() function. */ /** Enum for the possible return codes of the \ref GetHIDReportData() function. */
enum KeyboardHostWithParser_GetHIDReportDataCodes_t enum KeyboardHostWithParser_GetHIDReportDataCodes_t

@ -129,9 +129,9 @@ uint8_t DComp_NextMIDIStreamingInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the MIDI descriptor class, subclass and protocol, break out if correct data interface found */ /* Check the MIDI descriptor class, subclass and protocol, break out if correct data interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == MIDI_STREAMING_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == AUDIO_CSCP_AudioClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == MIDI_STREAMING_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == AUDIO_CSCP_MIDIStreamingSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MIDI_STREAMING_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == AUDIO_CSCP_StreamingProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,15 +42,6 @@
#include "MIDIHost.h" #include "MIDIHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the MIDI Audio class. */
#define MIDI_STREAMING_CLASS 0x01
/** Interface Class value for the MIDI Audio Streaming subclass. */
#define MIDI_STREAMING_SUBCLASS 0x03
/** Interface Class value for the MIDI Audio Streaming protocol. */
#define MIDI_STREAMING_PROTOCOL 0x00
/** Pipe number for the MIDI data IN pipe. */ /** Pipe number for the MIDI data IN pipe. */
#define MIDI_DATA_IN_PIPE 1 #define MIDI_DATA_IN_PIPE 1

@ -189,7 +189,7 @@ static uint8_t MassStore_SendReceiveData(MS_CommandBlockWrapper_t* const SCSICom
uint16_t BytesRem = SCSICommandBlock->DataTransferLength; uint16_t BytesRem = SCSICommandBlock->DataTransferLength;
/* Check the direction of the SCSI command data stage */ /* Check the direction of the SCSI command data stage */
if (SCSICommandBlock->Flags & COMMAND_DIRECTION_DATA_IN) if (SCSICommandBlock->Flags & MS_COMMAND_DIR_DATA_IN)
{ {
/* Wait until the device has replied with some data */ /* Wait until the device has replied with some data */
if ((ErrorCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_NoError) if ((ErrorCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_NoError)
@ -347,9 +347,9 @@ uint8_t MassStore_Inquiry(const uint8_t LUNIndex,
/* Create a CBW with a SCSI command to issue INQUIRY command */ /* Create a CBW with a SCSI command to issue INQUIRY command */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = sizeof(SCSI_Inquiry_Response_t), .DataTransferLength = sizeof(SCSI_Inquiry_Response_t),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -398,9 +398,9 @@ uint8_t MassStore_RequestSense(const uint8_t LUNIndex,
/* Create a CBW with a SCSI command to issue REQUEST SENSE command */ /* Create a CBW with a SCSI command to issue REQUEST SENSE command */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = sizeof(SCSI_Request_Sense_Response_t), .DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -455,9 +455,9 @@ uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex,
/* Create a CBW with a SCSI command to read in the given blocks from the device */ /* Create a CBW with a SCSI command to read in the given blocks from the device */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = ((uint32_t)Blocks * BlockSize), .DataTransferLength = ((uint32_t)Blocks * BlockSize),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 10, .SCSICommandLength = 10,
.SCSICommandData = .SCSICommandData =
@ -516,9 +516,9 @@ uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex,
/* Create a CBW with a SCSI command to write the given blocks to the device */ /* Create a CBW with a SCSI command to write the given blocks to the device */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = ((uint32_t)Blocks * BlockSize), .DataTransferLength = ((uint32_t)Blocks * BlockSize),
.Flags = COMMAND_DIRECTION_DATA_OUT, .Flags = MS_COMMAND_DIR_DATA_OUT,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 10, .SCSICommandLength = 10,
.SCSICommandData = .SCSICommandData =
@ -569,9 +569,9 @@ uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
/* Create a CBW with a SCSI command to issue TEST UNIT READY command */ /* Create a CBW with a SCSI command to issue TEST UNIT READY command */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = 0, .DataTransferLength = 0,
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -620,9 +620,9 @@ uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex,
/* Create a CBW with a SCSI command to issue READ CAPACITY command */ /* Create a CBW with a SCSI command to issue READ CAPACITY command */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = sizeof(SCSI_Capacity_t), .DataTransferLength = sizeof(SCSI_Capacity_t),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 10, .SCSICommandLength = 10,
.SCSICommandData = .SCSICommandData =
@ -680,9 +680,9 @@ uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex,
/* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */ /* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.Signature = CBW_SIGNATURE, .Signature = MS_CBW_SIGNATURE,
.DataTransferLength = 0, .DataTransferLength = 0,
.Flags = COMMAND_DIRECTION_DATA_OUT, .Flags = MS_COMMAND_DIR_DATA_OUT,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =

@ -120,8 +120,8 @@ uint8_t DComp_NextMouseInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == MOUSE_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MOUSE_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == HID_CSCP_MouseBootProtocol))
{ {
/* Indicate that the descriptor being searched for has been found */ /* Indicate that the descriptor being searched for has been found */
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;

@ -42,12 +42,6 @@
#include "MouseHost.h" #include "MouseHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Human Interface Device class. */
#define MOUSE_CLASS 0x03
/** Interface Protocol value for a Boot Protocol Mouse compliant device. */
#define MOUSE_PROTOCOL 0x02
/** Pipe number for the mouse data IN pipe. */ /** Pipe number for the mouse data IN pipe. */
#define MOUSE_DATA_IN_PIPE 1 #define MOUSE_DATA_IN_PIPE 1

@ -133,9 +133,8 @@ uint8_t DComp_NextMouseInterface(void* CurrentDescriptor)
{ {
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the HID descriptor class, break out if correct class interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == MOUSE_CLASS) && if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass)
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MOUSE_PROTOCOL))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,12 +42,6 @@
#include "HIDReport.h" #include "HIDReport.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Human Interface Device class. */
#define MOUSE_CLASS 0x03
/** Interface Protocol value for a Boot Protocol Mouse compliant device. */
#define MOUSE_PROTOCOL 0x02
/** Pipe number for the mouse report data pipe. */ /** Pipe number for the mouse report data pipe. */
#define MOUSE_DATA_IN_PIPE 1 #define MOUSE_DATA_IN_PIPE 1

@ -132,10 +132,10 @@ uint8_t DComp_NextBidirectionalPrinterInterface(void* CurrentDescriptor)
{ {
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the descriptor class, subclass and protocol, break out if correct value interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == PRINTER_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == PRNT_CSCP_PrinterClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRINTER_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRNT_CSCP_PrinterSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == PRINTER_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == PRNT_CSCP_BidirectionalProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -38,15 +38,6 @@
#include "Lib/PrinterCommands.h" #include "Lib/PrinterCommands.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Printer Device class. */
#define PRINTER_CLASS 0x07
/** Interface Subclass value for the Printer Device class. */
#define PRINTER_SUBCLASS 0x01
/** Interface Protocol value for a Bidirectional communication encapsulation. */
#define PRINTER_PROTOCOL 0x02
/** Pipe number of the Printer data IN pipe. */ /** Pipe number of the Printer data IN pipe. */
#define PRINTER_DATA_IN_PIPE 1 #define PRINTER_DATA_IN_PIPE 1
@ -68,12 +59,12 @@
/** Interface index of the Bidirectional Printer interface within the device, once the Configuration /** Interface index of the Bidirectional Printer interface within the device, once the Configuration
* Descriptor has been processed. * Descriptor has been processed.
*/ */
uint8_t PrinterInterfaceNumber; extern uint8_t PrinterInterfaceNumber;
/** Interface Alternate Setting index of the Bidirectional Printer interface within the device, once /** Interface Alternate Setting index of the Bidirectional Printer interface within the device, once
* the Configuration Descriptor has been processed. * the Configuration Descriptor has been processed.
*/ */
uint8_t PrinterAltSetting; extern uint8_t PrinterAltSetting;
/* Function Prototypes: */ /* Function Prototypes: */
uint8_t ProcessConfigurationDescriptor(void); uint8_t ProcessConfigurationDescriptor(void);

@ -160,9 +160,9 @@ uint8_t DComp_NextCDCControlInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the CDC descriptor class, subclass and protocol, break out if correct control interface found */ /* Check the CDC descriptor class, subclass and protocol, break out if correct control interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CONTROL_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CSCP_CDCClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CONTROL_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_ACMSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CONTROL_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_VendorSpecificProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
@ -184,9 +184,9 @@ uint8_t DComp_NextCDCDataInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the CDC descriptor class, subclass and protocol, break out if correct data interface found */ /* Check the CDC descriptor class, subclass and protocol, break out if correct data interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_DATA_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CSCP_CDCDataClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_DATA_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_NoDataSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_DATA_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_NoDataProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,15 +42,6 @@
#include "RNDISEthernetHost.h" #include "RNDISEthernetHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the CDC data class. */
#define CDC_DATA_CLASS 0x0A
/** Interface Class value for the CDC data subclass. */
#define CDC_DATA_SUBCLASS 0x00
/** Interface Class value for the CDC data protocol. */
#define CDC_DATA_PROTOCOL 0x00
/** Pipe number for the RNDIS data IN pipe. */ /** Pipe number for the RNDIS data IN pipe. */
#define RNDIS_DATA_IN_PIPE 1 #define RNDIS_DATA_IN_PIPE 1

@ -143,10 +143,10 @@ uint8_t DComp_NextStillImageInterface(void* CurrentDescriptor)
{ {
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the descriptor class and protocol, break out if correct class/protocol interface found */ /* Check the descriptor class, subclass and protocol, break out if correct interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == SIMAGE_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == SI_CSCP_StillImageClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == SIMAGE_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == SI_CSCP_StillImageSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == SIMAGE_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == SI_CSCP_BulkOnlyProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,15 +42,6 @@
#include "StillImageHost.h" #include "StillImageHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the Still Image Device class. */
#define SIMAGE_CLASS 0x06
/** Interface Class value for the Still Image Device subclass. */
#define SIMAGE_SUBCLASS 0x01
/** Interface Class value for the Still Image Device protocol. */
#define SIMAGE_PROTOCOL 0x01
/** Pipe number of the Still Image data IN pipe. */ /** Pipe number of the Still Image data IN pipe. */
#define SIMAGE_DATA_IN_PIPE 1 #define SIMAGE_DATA_IN_PIPE 1

@ -160,9 +160,9 @@ uint8_t DComp_NextCDCControlInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the CDC descriptor class, subclass and protocol, break out if correct control interface found */ /* Check the CDC descriptor class, subclass and protocol, break out if correct control interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CONTROL_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CSCP_CDCClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CONTROL_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_ACMSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CONTROL_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_ATCommandProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
@ -184,9 +184,9 @@ uint8_t DComp_NextCDCDataInterface(void* CurrentDescriptor)
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
/* Check the CDC descriptor class, subclass and protocol, break out if correct data interface found */ /* Check the CDC descriptor class, subclass and protocol, break out if correct data interface found */
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_DATA_CLASS) && if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CSCP_CDCDataClass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_DATA_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_NoDataSubclass) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_DATA_PROTOCOL)) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_NoDataProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -42,24 +42,6 @@
#include "VirtualSerialHost.h" #include "VirtualSerialHost.h"
/* Macros: */ /* Macros: */
/** Interface Class value for the CDC class. */
#define CDC_CONTROL_CLASS 0x02
/** Interface Class value for the CDC Communication Interface subclass. */
#define CDC_CONTROL_SUBCLASS 0x02
/** Interface Class value for the CDC protocol. */
#define CDC_CONTROL_PROTOCOL 0x01
/** Interface Class value for the CDC data class. */
#define CDC_DATA_CLASS 0x0A
/** Interface Class value for the CDC data subclass. */
#define CDC_DATA_SUBCLASS 0x00
/** Interface Class value for the CDC data protocol. */
#define CDC_DATA_PROTOCOL 0x00
/** Pipe number for the CDC data IN pipe. */ /** Pipe number for the CDC data IN pipe. */
#define CDC_DATA_IN_PIPE 1 #define CDC_DATA_IN_PIPE 1

File diff suppressed because one or more lines are too long

@ -210,6 +210,31 @@
#define AUDIO_EP_ACCEPTS_SMALL_PACKETS (0 << 7) #define AUDIO_EP_ACCEPTS_SMALL_PACKETS (0 << 7)
/* Enums: */ /* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Audio
* device class.
*/
enum Audio_Descriptor_ClassSubclassProtocol_t
{
AUDIO_CSCP_AudioClass = 0x01, /**< Descriptor Class value indicating that the device or
* interface belongs to the USB Audio 1.0 class.
*/
AUDIO_CSCP_ControlSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or
* interface belongs to the Audio Control subclass.
*/
AUDIO_CSCP_ControlProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or
* interface belongs to the Audio Control protocol.
*/
AUDIO_CSCP_AudioStreamingSubclass = 0x02, /**< Descriptor Subclass value indicating that the device or
* interface belongs to the MIDI Streaming subclass.
*/
AUDIO_CSCP_MIDIStreamingSubclass = 0x03, /**< Descriptor Subclass value indicating that the device or
* interface belongs to the Audio streaming subclass.
*/
AUDIO_CSCP_StreamingProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or
* interface belongs to the Streaming Audio protocol.
*/
};
/** Audio class specific interface description subtypes, for the Audio Control interface. */ /** Audio class specific interface description subtypes, for the Audio Control interface. */
enum Audio_CSInterface_AC_SubTypes_t enum Audio_CSInterface_AC_SubTypes_t
{ {

@ -127,6 +127,40 @@
} }
/* Enums: */ /* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the CDC
* device class.
*/
enum CDC_Descriptor_ClassSubclassProtocol_t
{
CDC_CSCP_CDCClass = 0x02, /**< Descriptor Class value indicating that the device or interface
* belongs to the CDC class.
*/
CDC_CSCP_NoSpecificSubclass = 0x00, /**< Descriptor Subclass value indicating that the device or interface
* belongs to no specific subclass of the CDC class.
*/
CDC_CSCP_ACMSubclass = 0x02, /**< Descriptor Subclass value indicating that the device or interface
* belongs to the Abstract Control Model CDC subclass.
*/
CDC_CSCP_ATCommandProtocol = 0x01, /**< Descriptor Protocol value indicating that the device or interface
* belongs to the AT Command protocol of the CDC class.
*/
CDC_CSCP_NoSpecificProtocol = 0x00, /**< Descriptor Class value indicating that the device or interface
* belongs to no specific protocol of the CDC class.
*/
CDC_CSCP_VendorSpecificProtocol = 0xFF, /**< Descriptor Class value indicating that the device or interface
* belongs to a vendor-specific protocol of the CDC class.
*/
CDC_CSCP_CDCDataClass = 0x0A, /**< Descriptor Class value indicating that the device or interface
* belongs to the CDC Data class.
*/
CDC_CSCP_NoDataSubclass = 0x00, /**< Descriptor Subclass value indicating that the device or interface
* belongs to no specific subclass of the CDC data class.
*/
CDC_CSCP_NoDataProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or interface
* belongs to no specific protocol of the CDC data class.
*/
};
/** Enum for the CDC class specific control requests that can be issued by the USB bus host. */ /** Enum for the CDC class specific control requests that can be issued by the USB bus host. */
enum CDC_ClassRequests_t enum CDC_ClassRequests_t
{ {

@ -98,6 +98,31 @@
#define HID_KEYBOARD_LED_KATANA (1 << 3) #define HID_KEYBOARD_LED_KATANA (1 << 3)
/* Type Defines: */ /* Type Defines: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the HID
* device class.
*/
enum HID_Descriptor_ClassSubclassProtocol_t
{
HID_CSCP_HIDClass = 0x03, /**< Descriptor Class value indicating that the device or interface
* belongs to the HID class.
*/
HID_CSCP_NonBootSubclass = 0x00, /**< Descriptor Subclass value indicating that the device or interface
* does not implement a HID boot protocol.
*/
HID_CSCP_BootSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or interface
* implements a HID boot protocol.
*/
HID_CSCP_NonBootProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or interface
* does not belong to a HID boot protocol.
*/
HID_CSCP_KeyboardBootProtocol = 0x01, /**< Descriptor Protocol value indicating that the device or interface
* belongs to the Keyboard HID boot protocol.
*/
HID_CSCP_MouseBootProtocol = 0x02, /**< Descriptor Protocol value indicating that the device or interface
* belongs to the Mouse HID boot protocol.
*/
};
/** Enum for the HID class specific control requests that can be issued by the USB bus host. */ /** Enum for the HID class specific control requests that can be issued by the USB bus host. */
enum HID_ClassRequests_t enum HID_ClassRequests_t
{ {
@ -116,23 +141,6 @@
HID_DTYPE_Report = 0x22, /**< Descriptor header type value, to indicate a HID class HID report descriptor. */ HID_DTYPE_Report = 0x22, /**< Descriptor header type value, to indicate a HID class HID report descriptor. */
}; };
/** Enum for the HID class boot protocols that may be supported by HID devices. */
enum HID_BootProtocols_t
{
HID_BOOTP_NonBootProtocol = 0x00, /**< Constant for the protocol value of a HID interface descriptor, indicating
* that the interface does not support any HID class boot protocol (see HID
* Class Specification).
*/
HID_BOOTP_KeyboardBootProtocol = 0x01, /**< Constant for the protocol value of a HID interface descriptor, indicating
* that the interface supports the HID class Keyboard boot protocol (see HID
* Class Specification).
*/
HID_BOOTP_MouseBootProtocol = 0x02, /**< Constant for the protocol value of a HID interface descriptor, indicating
* that the interface supports the HID class Mouse boot protocol (see HID Class
* Specification).
*/
};
/** Enum for the different types of HID reports. */ /** Enum for the different types of HID reports. */
enum HID_ReportItemTypes_t enum HID_ReportItemTypes_t
{ {

@ -87,6 +87,7 @@
#define MIDI_CHANNEL(channel) ((channel) - 1) #define MIDI_CHANNEL(channel) ((channel) - 1)
/* Enums: */ /* Enums: */
/** Enum for the possible MIDI jack types in a MIDI device jack descriptor. */
enum MIDI_JackTypes_t enum MIDI_JackTypes_t
{ {
MIDI_JACKTYPE_Embedded = 0x01, /**< MIDI class descriptor jack type value for an embedded (logical) MIDI input or output jack. */ MIDI_JACKTYPE_Embedded = 0x01, /**< MIDI class descriptor jack type value for an embedded (logical) MIDI input or output jack. */

@ -205,25 +205,42 @@
#define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07 #define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
/* Enums: */ /* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Mass
* Storage device class.
*/
enum MS_Descriptor_ClassSubclassProtocol_t
{
MS_CSCP_MassStorageClass = 0x08, /**< Descriptor Class value indicating that the device or interface
* belongs to the Mass Storage class.
*/
MS_CSCP_SCSITransparentSubclass = 0x06, /**< Descriptor Subclass value indicating that the device or interface
* belongs to the SCSI Transparent Command Set subclass of the Mass
* storage class.
*/
MS_CSCP_BulkOnlyTransportProtocol = 0x50, /**< Descriptor Protocol value indicating that the device or interface
* belongs to the Bulk Only Transport protocol of the Mass Storage class.
*/
};
/** Enum for the Mass Storage class specific control requests that can be issued by the USB bus host. */ /** Enum for the Mass Storage class specific control requests that can be issued by the USB bus host. */
enum MS_ClassRequests_t enum MS_ClassRequests_t
{ {
MS_REQ_GetMaxLUN = 0xFE, /**< Mass Storage class-specific request to retrieve the total number of Logical MS_REQ_GetMaxLUN = 0xFE, /**< Mass Storage class-specific request to retrieve the total number of Logical
* Units (drives) in the SCSI device. * Units (drives) in the SCSI device.
*/ */
MS_REQ_MassStorageReset = 0xFF, /**< Mass Storage class-specific request to reset the Mass Storage interface, MS_REQ_MassStorageReset = 0xFF, /**< Mass Storage class-specific request to reset the Mass Storage interface,
* ready for the next command. * ready for the next command.
*/ */
}; };
/** Enum for the possible command status wrapper return status codes. */ /** Enum for the possible command status wrapper return status codes. */
enum MS_CommandStatusCodes_t enum MS_CommandStatusCodes_t
{ {
MS_SCSI_COMMAND_Pass = 0, /**< Command completed with no error */ MS_SCSI_COMMAND_Pass = 0, /**< Command completed with no error */
MS_SCSI_COMMAND_Fail = 1, /**< Command failed to complete - host may check the exact error via a MS_SCSI_COMMAND_Fail = 1, /**< Command failed to complete - host may check the exact error via a
* SCSI REQUEST SENSE command. * SCSI REQUEST SENSE command.
*/ */
MS_SCSI_COMMAND_PhaseError = 2, /**< Command failed due to being invalid in the current phase. */ MS_SCSI_COMMAND_PhaseError = 2, /**< Command failed due to being invalid in the current phase. */
}; };
/* Type Defines: */ /* Type Defines: */

@ -76,19 +76,35 @@
#define PRNT_PORTSTATUS_PAPEREMPTY (1 << 5) #define PRNT_PORTSTATUS_PAPEREMPTY (1 << 5)
/* Enums: */ /* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Printer
* device class.
*/
enum PRNT_Descriptor_ClassSubclassProtocol_t
{
PRNT_CSCP_PrinterClass = 0x07, /**< Descriptor Class value indicating that the device or interface
* belongs to the Printer class.
*/
PRNT_CSCP_PrinterSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or interface
* belongs to the Printer subclass.
*/
PRNT_CSCP_BidirectionalProtocol = 0x02, /**< Descriptor Protocol value indicating that the device or interface
* belongs to the Bidirectional protocol of the Printer class.
*/
};
/** Enum for the Printer class specific control requests that can be issued by the USB bus host. */ /** Enum for the Printer class specific control requests that can be issued by the USB bus host. */
enum PRNT_ClassRequests_t enum PRNT_ClassRequests_t
{ {
PRNT_REQ_GetDeviceID = 0x00, /**< Printer class-specific request to retrieve the Unicode ID PRNT_REQ_GetDeviceID = 0x00, /**< Printer class-specific request to retrieve the Unicode ID
* string of the device, containing the device's name, manufacturer * string of the device, containing the device's name, manufacturer
* and supported printer languages. * and supported printer languages.
*/ */
PRNT_REQ_GetPortStatus = 0x01, /**< Printer class-specific request to get the current status of the PRNT_REQ_GetPortStatus = 0x01, /**< Printer class-specific request to get the current status of the
* virtual printer port, for device selection and ready states. * virtual printer port, for device selection and ready states.
*/ */
PRNT_REQ_SoftReset = 0x02, /**< Printer class-specific request to reset the device, ready for new PRNT_REQ_SoftReset = 0x02, /**< Printer class-specific request to reset the device, ready for new
* printer commands. * printer commands.
*/ */
}; };
/* Disable C linkage for C++ Compilers: */ /* Disable C linkage for C++ Compilers: */

@ -100,6 +100,22 @@
}; };
/* Enums: */ /* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the
* Still Image device class.
*/
enum SI_Descriptor_ClassSubclassProtocol_t
{
SI_CSCP_StillImageClass = 0x06, /**< Descriptor Class value indicating that the device or interface
* belongs to the Still Image class.
*/
SI_CSCP_StillImageSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or interface
* belongs to the Still Image subclass.
*/
SI_CSCP_BulkOnlyProtocol = 0x01, /**< Descriptor Protocol value indicating that the device or interface
* belongs to the Bulk Only Transport protocol of the Still Image class.
*/
};
/** Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device. */ /** Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device. */
enum PIMA_ResponseCodes_t enum PIMA_ResponseCodes_t
{ {

@ -142,9 +142,9 @@ static uint8_t DCOMP_CDC_Host_NextCDCControlInterface(void* const CurrentDescrip
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == CDC_CONTROL_CLASS) && if ((CurrentInterface->Class == CDC_CSCP_CDCClass) &&
(CurrentInterface->SubClass == CDC_CONTROL_SUBCLASS) && (CurrentInterface->SubClass == CDC_CSCP_ACMSubclass) &&
(CurrentInterface->Protocol == CDC_CONTROL_PROTOCOL)) (CurrentInterface->Protocol == CDC_CSCP_ATCommandProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
@ -160,9 +160,9 @@ static uint8_t DCOMP_CDC_Host_NextCDCDataInterface(void* const CurrentDescriptor
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == CDC_DATA_CLASS) && if ((CurrentInterface->Class == CDC_CSCP_CDCDataClass) &&
(CurrentInterface->SubClass == CDC_DATA_SUBCLASS) && (CurrentInterface->SubClass == CDC_CSCP_NoDataSubclass) &&
(CurrentInterface->Protocol == CDC_DATA_PROTOCOL)) (CurrentInterface->Protocol == CDC_CSCP_NoDataProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -306,14 +306,6 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */
#define CDC_CONTROL_CLASS 0x02
#define CDC_CONTROL_SUBCLASS 0x02
#define CDC_CONTROL_PROTOCOL 0x01
#define CDC_DATA_CLASS 0x0A
#define CDC_DATA_SUBCLASS 0x00
#define CDC_DATA_PROTOCOL 0x00
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_CDC_HOST_C) #if defined(__INCLUDE_FROM_CDC_HOST_C)
static int CDC_Host_putchar(char c, static int CDC_Host_putchar(char c,

@ -118,7 +118,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
HIDInterfaceInfo->State.InterfaceNumber = HIDInterface->InterfaceNumber; HIDInterfaceInfo->State.InterfaceNumber = HIDInterface->InterfaceNumber;
HIDInterfaceInfo->State.HIDReportSize = HIDDescriptor->HIDReportLength; HIDInterfaceInfo->State.HIDReportSize = HIDDescriptor->HIDReportLength;
HIDInterfaceInfo->State.SupportsBootProtocol = (HIDInterface->SubClass != HID_BOOTP_NonBootProtocol); HIDInterfaceInfo->State.SupportsBootProtocol = (HIDInterface->SubClass != HID_CSCP_NonBootProtocol);
HIDInterfaceInfo->State.LargestReportSize = 8; HIDInterfaceInfo->State.LargestReportSize = 8;
HIDInterfaceInfo->State.IsActive = true; HIDInterfaceInfo->State.IsActive = true;
@ -132,7 +132,7 @@ static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor)
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if (CurrentInterface->Class == HID_INTERFACE_CLASS) if (CurrentInterface->Class == HID_CSCP_HIDClass)
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -297,9 +297,6 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */
#define HID_INTERFACE_CLASS 0x03
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_HID_HOST_C) #if defined(__INCLUDE_FROM_HID_HOST_C)
static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1); static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);

@ -110,9 +110,9 @@ static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDes
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == MIDI_STREAMING_CLASS) && if ((CurrentInterface->Class == AUDIO_CSCP_AudioClass) &&
(CurrentInterface->SubClass == MIDI_STREAMING_SUBCLASS) && (CurrentInterface->SubClass == AUDIO_CSCP_MIDIStreamingSubclass) &&
(CurrentInterface->Protocol == MIDI_STREAMING_PROTOCOL)) (CurrentInterface->Protocol == AUDIO_CSCP_StreamingProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -188,11 +188,6 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */
#define MIDI_STREAMING_CLASS 0x01
#define MIDI_STREAMING_SUBCLASS 0x03
#define MIDI_STREAMING_PROTOCOL 0x00
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_MIDI_HOST_C) #if defined(__INCLUDE_FROM_MIDI_HOST_C)
static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1); static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);

@ -110,9 +110,9 @@ static uint8_t DCOMP_MS_Host_NextMSInterface(void* const CurrentDescriptor)
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == MASS_STORE_CLASS) && if ((CurrentInterface->Class == MS_CSCP_MassStorageClass) &&
(CurrentInterface->SubClass == MASS_STORE_SUBCLASS) && (CurrentInterface->SubClass == MS_CSCP_SCSITransparentSubclass) &&
(CurrentInterface->Protocol == MASS_STORE_PROTOCOL)) (CurrentInterface->Protocol == MS_CSCP_BulkOnlyTransportProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
@ -150,7 +150,7 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
{ {
uint8_t ErrorCode = PIPE_RWSTREAM_NoError; uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
SCSICommandBlock->Signature = CBW_SIGNATURE; SCSICommandBlock->Signature = MS_CBW_SIGNATURE;
SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag; SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag;
if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF) if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF)
@ -180,7 +180,7 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
{ {
uint16_t TimeoutMSRem = COMMAND_DATA_TIMEOUT_MS; uint16_t TimeoutMSRem = MS_COMMAND_DATA_TIMEOUT_MS;
uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber(); uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber();
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber); Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
@ -240,7 +240,7 @@ static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfac
uint8_t ErrorCode = PIPE_RWSTREAM_NoError; uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
uint16_t BytesRem = SCSICommandBlock->DataTransferLength; uint16_t BytesRem = SCSICommandBlock->DataTransferLength;
if (SCSICommandBlock->Flags & COMMAND_DIRECTION_DATA_IN) if (SCSICommandBlock->Flags & MS_COMMAND_DIR_DATA_IN)
{ {
if ((ErrorCode = MS_Host_WaitForDataReceived(MSInterfaceInfo)) != PIPE_RWSTREAM_NoError) if ((ErrorCode = MS_Host_WaitForDataReceived(MSInterfaceInfo)) != PIPE_RWSTREAM_NoError)
{ {
@ -357,7 +357,7 @@ uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = sizeof(SCSI_Inquiry_Response_t), .DataTransferLength = sizeof(SCSI_Inquiry_Response_t),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -393,7 +393,7 @@ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = 0, .DataTransferLength = 0,
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -430,7 +430,7 @@ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = sizeof(SCSI_Capacity_t), .DataTransferLength = sizeof(SCSI_Capacity_t),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 10, .SCSICommandLength = 10,
.SCSICommandData = .SCSICommandData =
@ -474,7 +474,7 @@ uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = sizeof(SCSI_Request_Sense_Response_t), .DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -511,7 +511,7 @@ uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInter
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = 0, .DataTransferLength = 0,
.Flags = COMMAND_DIRECTION_DATA_OUT, .Flags = MS_COMMAND_DIR_DATA_OUT,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 6, .SCSICommandLength = 6,
.SCSICommandData = .SCSICommandData =
@ -551,7 +551,7 @@ uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = ((uint32_t)Blocks * BlockSize), .DataTransferLength = ((uint32_t)Blocks * BlockSize),
.Flags = COMMAND_DIRECTION_DATA_IN, .Flags = MS_COMMAND_DIR_DATA_IN,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 10, .SCSICommandLength = 10,
.SCSICommandData = .SCSICommandData =
@ -595,7 +595,7 @@ uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t) MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
{ {
.DataTransferLength = ((uint32_t)Blocks * BlockSize), .DataTransferLength = ((uint32_t)Blocks * BlockSize),
.Flags = COMMAND_DIRECTION_DATA_OUT, .Flags = MS_COMMAND_DIR_DATA_OUT,
.LUN = LUNIndex, .LUN = LUNIndex,
.SCSICommandLength = 10, .SCSICommandLength = 10,
.SCSICommandData = .SCSICommandData =

@ -313,17 +313,7 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */ /* Macros: */
#define MASS_STORE_CLASS 0x08 #define MS_COMMAND_DATA_TIMEOUT_MS 10000
#define MASS_STORE_SUBCLASS 0x06
#define MASS_STORE_PROTOCOL 0x50
#define CBW_SIGNATURE 0x43425355UL
#define CSW_SIGNATURE 0x53425355UL
#define COMMAND_DIRECTION_DATA_OUT (0 << 7)
#define COMMAND_DIRECTION_DATA_IN (1 << 7)
#define COMMAND_DATA_TIMEOUT_MS 10000
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_MASSSTORAGE_HOST_C) #if defined(__INCLUDE_FROM_MASSSTORAGE_HOST_C)

@ -111,9 +111,9 @@ static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* CurrentDescriptor)
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == PRINTER_CLASS) && if ((CurrentInterface->Class == PRNT_CSCP_PrinterClass) &&
(CurrentInterface->SubClass == PRINTER_SUBCLASS) && (CurrentInterface->SubClass == PRNT_CSCP_PrinterSubclass) &&
(CurrentInterface->Protocol == PRINTER_PROTOCOL)) (CurrentInterface->Protocol == PRNT_CSCP_BidirectionalProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -264,11 +264,6 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */
#define PRINTER_CLASS 0x07
#define PRINTER_SUBCLASS 0x01
#define PRINTER_PROTOCOL 0x02
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_PRINTER_HOST_C) #if defined(__INCLUDE_FROM_PRINTER_HOST_C)
static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1); static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);

@ -142,9 +142,9 @@ static uint8_t DCOMP_RNDIS_Host_NextRNDISControlInterface(void* const CurrentDes
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == RNDIS_CONTROL_CLASS) && if ((CurrentInterface->Class == CDC_CSCP_CDCClass) &&
(CurrentInterface->SubClass == RNDIS_CONTROL_SUBCLASS) && (CurrentInterface->SubClass == CDC_CSCP_ACMSubclass) &&
(CurrentInterface->Protocol == RNDIS_CONTROL_PROTOCOL)) (CurrentInterface->Protocol == CDC_CSCP_VendorSpecificProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
@ -160,9 +160,9 @@ static uint8_t DCOMP_RNDIS_Host_NextRNDISDataInterface(void* const CurrentDescri
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == RNDIS_DATA_CLASS) && if ((CurrentInterface->Class == CDC_CSCP_CDCDataClass) &&
(CurrentInterface->SubClass == RNDIS_DATA_SUBCLASS) && (CurrentInterface->SubClass == CDC_CSCP_NoDataSubclass) &&
(CurrentInterface->Protocol == RNDIS_DATA_PROTOCOL)) (CurrentInterface->Protocol == CDC_CSCP_NoDataProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }

@ -262,14 +262,6 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */
#define RNDIS_CONTROL_CLASS 0x02
#define RNDIS_CONTROL_SUBCLASS 0x02
#define RNDIS_CONTROL_PROTOCOL 0xFF
#define RNDIS_DATA_CLASS 0x0A
#define RNDIS_DATA_SUBCLASS 0x00
#define RNDIS_DATA_PROTOCOL 0x00
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_RNDIS_HOST_C) #if defined(__INCLUDE_FROM_RNDIS_HOST_C)
static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,

@ -128,9 +128,9 @@ uint8_t DCOMP_SI_Host_NextSIInterface(void* const CurrentDescriptor)
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t); USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == STILL_IMAGE_CLASS) && if ((CurrentInterface->Class == SI_CSCP_StillImageClass) &&
(CurrentInterface->SubClass == STILL_IMAGE_SUBCLASS) && (CurrentInterface->SubClass == SI_CSCP_StillImageSubclass) &&
(CurrentInterface->Protocol == STILL_IMAGE_PROTOCOL)) (CurrentInterface->Protocol == SI_CSCP_BulkOnlyProtocol))
{ {
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
@ -196,7 +196,7 @@ uint8_t SI_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
uint8_t SI_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, uint8_t SI_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
PIMA_Container_t* const PIMAHeader) PIMA_Container_t* const PIMAHeader)
{ {
uint16_t TimeoutMSRem = COMMAND_DATA_TIMEOUT_MS; uint16_t TimeoutMSRem = SI_COMMAND_DATA_TIMEOUT_MS;
uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber(); uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber();
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive)) if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))

@ -311,11 +311,7 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */ /* Macros: */
#define STILL_IMAGE_CLASS 0x06 #define SI_COMMAND_DATA_TIMEOUT_MS 10000
#define STILL_IMAGE_SUBCLASS 0x01
#define STILL_IMAGE_PROTOCOL 0x01
#define COMMAND_DATA_TIMEOUT_MS 10000
/* Function Prototypes: */ /* Function Prototypes: */
#if defined(__INCLUDE_FROM_STILLIMAGE_HOST_C) #if defined(__INCLUDE_FROM_STILLIMAGE_HOST_C)

@ -203,17 +203,49 @@
/** Enum for the possible standard descriptor types, as given in each descriptor's header. */ /** Enum for the possible standard descriptor types, as given in each descriptor's header. */
enum USB_DescriptorTypes_t enum USB_DescriptorTypes_t
{ {
DTYPE_Device = 0x01, /**< Indicates that the descriptor is a device descriptor. */ DTYPE_Device = 0x01, /**< Indicates that the descriptor is a device descriptor. */
DTYPE_Configuration = 0x02, /**< Indicates that the descriptor is a configuration descriptor. */ DTYPE_Configuration = 0x02, /**< Indicates that the descriptor is a configuration descriptor. */
DTYPE_String = 0x03, /**< Indicates that the descriptor is a string descriptor. */ DTYPE_String = 0x03, /**< Indicates that the descriptor is a string descriptor. */
DTYPE_Interface = 0x04, /**< Indicates that the descriptor is an interface descriptor. */ DTYPE_Interface = 0x04, /**< Indicates that the descriptor is an interface descriptor. */
DTYPE_Endpoint = 0x05, /**< Indicates that the descriptor is an endpoint descriptor. */ DTYPE_Endpoint = 0x05, /**< Indicates that the descriptor is an endpoint descriptor. */
DTYPE_DeviceQualifier = 0x06, /**< Indicates that the descriptor is a device qualifier descriptor. */ DTYPE_DeviceQualifier = 0x06, /**< Indicates that the descriptor is a device qualifier descriptor. */
DTYPE_Other = 0x07, /**< Indicates that the descriptor is of other type. */ DTYPE_Other = 0x07, /**< Indicates that the descriptor is of other type. */
DTYPE_InterfacePower = 0x08, /**< Indicates that the descriptor is an interface power descriptor. */ DTYPE_InterfacePower = 0x08, /**< Indicates that the descriptor is an interface power descriptor. */
DTYPE_InterfaceAssociation = 0x0B, /**< Indicates that the descriptor is an interface association descriptor. */ DTYPE_InterfaceAssociation = 0x0B, /**< Indicates that the descriptor is an interface association descriptor. */
DTYPE_CSInterface = 0x24, /**< Indicates that the descriptor is a class specific interface descriptor. */ DTYPE_CSInterface = 0x24, /**< Indicates that the descriptor is a class specific interface descriptor. */
DTYPE_CSEndpoint = 0x25, /**< Indicates that the descriptor is a class specific endpoint descriptor. */ DTYPE_CSEndpoint = 0x25, /**< Indicates that the descriptor is a class specific endpoint descriptor. */
};
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors. */
enum USB_Descriptor_ClassSubclassProtocol_t
{
USB_CSCP_NoDeviceClass = 0x00, /**< Descriptor Class value indicating that the device does not belong
* to a particular class at the device level.
*/
USB_CSCP_NoDeviceSubclass = 0x00, /**< Descriptor Subclass value indicating that the device does not belong
* to a particular subclass at the device level.
*/
USB_CSCP_NoDeviceProtocol = 0x00, /**< Descriptor Protocol value indicating that the device does not belong
* to a particular protocol at the device level.
*/
USB_CSCP_VendorSpecificClass = 0xFF, /**< Descriptor Class value indicating that the device/interface belongs
* to a vendor specific class.
*/
USB_CSCP_VendorSpecificSubclass = 0xFF, /**< Descriptor Subclass value indicating that the device/interface belongs
* to a vendor specific subclass.
*/
USB_CSCP_VendorSpecificProtocol = 0xFF, /**< Descriptor Protocol value indicating that the device/interface belongs
* to a vendor specific protocol.
*/
USB_CSCP_IADDeviceClass = 0xEF, /**< Descriptor Class value indicating that the device belongs to the
* Interface Association Descriptor class.
*/
USB_CSCP_IADDeviceSubclass = 0x02, /**< Descriptor Subclass value indicating that the device belongs to the
* Interface Association Descriptor subclass.
*/
USB_CSCP_IADDeviceProtocol = 0x01, /**< Descriptor Protocol value indicating that the device belongs to the
* Interface Association Descriptor protocol.
*/
}; };
/* Type Defines: */ /* Type Defines: */

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xFF, .Class = USB_CSCP_VendorSpecificClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,7 +95,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0xFF, .Class = USB_CSCP_VendorSpecificClass,
.SubClass = 0x00, .SubClass = 0x00,
.Protocol = 0x00, .Protocol = 0x00,

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -61,9 +61,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xEF, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x02, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x01, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -109,9 +109,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x08, .Class = MS_CSCP_MassStorageClass,
.SubClass = 0x06, .SubClass = MS_CSCP_SCSITransparentSubclass,
.Protocol = 0x50, .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -81,9 +81,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -129,9 +129,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x01, .SubClass = HID_CSCP_BootSubclass,
.Protocol = 0x01, .Protocol = HID_CSCP_KeyboardBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -48,9 +48,9 @@ USB_Descriptor_Device_t PROGMEM RelayBoard_DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xFF, .Class = USB_CSCP_VendorSpecificClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -96,7 +96,7 @@ RelayBoard_USB_Descriptor_Configuration_t PROGMEM RelayBoard_ConfigurationDescri
.TotalEndpoints = 0, .TotalEndpoints = 0,
.Class = 0xFF, .Class = USB_CSCP_VendorSpecificClass,
.SubClass = 0x00, .SubClass = 0x00,
.Protocol = 0x00, .Protocol = 0x00,

@ -85,9 +85,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -133,9 +133,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x08, .Class = MS_CSCP_MassStorageClass,
.SubClass = 0x06, .SubClass = MS_CSCP_SCSITransparentSubclass,
.Protocol = 0x50, .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -169,9 +169,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x03, .Class = HID_CSCP_HIDClass,
.SubClass = 0x00, .SubClass = HID_CSCP_NonBootSubclass,
.Protocol = HID_BOOTP_NonBootProtocol, .Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x00, .Class = USB_CSCP_NoDeviceClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x08, .Class = MS_CSCP_MassStorageClass,
.SubClass = 0x06, .SubClass = MS_CSCP_SCSITransparentSubclass,
.Protocol = 0x50, .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM AVRISP_DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0xFF, .Class = USB_CSCP_VendorSpecificClass,
.SubClass = 0x00, .SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = 0x00, .Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -95,7 +95,7 @@ AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0xFF, .Class = USB_CSCP_VendorSpecificClass,
.SubClass = 0x00, .SubClass = 0x00,
.Protocol = 0x00, .Protocol = 0x00,

@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM USART_DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10), .USBSpecification = VERSION_BCD(01.10),
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@ -107,9 +107,9 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
.TotalEndpoints = 1, .TotalEndpoints = 1,
.Class = 0x02, .Class = CDC_CSCP_CDCClass,
.SubClass = 0x02, .SubClass = CDC_CSCP_ACMSubclass,
.Protocol = 0x01, .Protocol = CDC_CSCP_ATCommandProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },
@ -158,9 +158,9 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
.TotalEndpoints = 2, .TotalEndpoints = 2,
.Class = 0x0A, .Class = CDC_CSCP_CDCDataClass,
.SubClass = 0x00, .SubClass = CDC_CSCP_NoDataSubclass,
.Protocol = 0x00, .Protocol = CDC_CSCP_NoDataProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR .InterfaceStrIndex = NO_DESCRIPTOR
}, },

Loading…
Cancel
Save