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.
This commit is contained in:
		
							parent
							
								
									b37d77eab3
								
							
						
					
					
						commit
						55538dcef3
					
				
					 96 changed files with 650 additions and 631 deletions
				
			
		| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(02.00),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x01,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_ControlSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_ControlProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(02.00),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x01,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_ControlSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_ControlProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0xEF,
 | 
			
		||||
	.SubClass               = 0x02,
 | 
			
		||||
	.Protocol               = 0x01,
 | 
			
		||||
	.Class                  = USB_CSCP_IADDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_IADDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_IADDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -105,9 +105,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
			.FirstInterfaceIndex    = 0,
 | 
			
		||||
			.TotalInterfaces        = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.IADStrIndex            = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -172,9 +172,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -206,9 +206,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
			.FirstInterfaceIndex    = 2,
 | 
			
		||||
			.TotalInterfaces        = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.IADStrIndex            = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -222,9 +222,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -273,9 +273,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -73,9 +73,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = HID_BOOTP_NonBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_NonBootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = HID_BOOTP_NonBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_NonBootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -89,9 +89,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -137,9 +137,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_KeyboardBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_KeyboardBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,9 +122,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -170,9 +170,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_KeyboardBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_KeyboardBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -207,9 +207,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_MouseBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x01,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_ControlSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_ControlProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -123,9 +123,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x03,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_MIDIStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x08,
 | 
			
		||||
			.SubClass               = 0x06,
 | 
			
		||||
			.Protocol               = 0x50,
 | 
			
		||||
			.Class                  = MS_CSCP_MassStorageClass,
 | 
			
		||||
			.SubClass               = MS_CSCP_SCSITransparentSubclass,
 | 
			
		||||
			.Protocol               = MS_CSCP_BulkOnlyTransportProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,9 +102,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -150,9 +150,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x08,
 | 
			
		||||
			.SubClass               = 0x06,
 | 
			
		||||
			.Protocol               = 0x50,
 | 
			
		||||
			.Class                  = MS_CSCP_MassStorageClass,
 | 
			
		||||
			.SubClass               = MS_CSCP_SCSITransparentSubclass,
 | 
			
		||||
			.Protocol               = MS_CSCP_BulkOnlyTransportProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -186,9 +186,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_KeyboardBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_KeyboardBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_MouseBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x02,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
	.SubClass               = CDC_CSCP_NoSpecificSubclass,
 | 
			
		||||
	.Protocol               = CDC_CSCP_NoSpecificProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0xFF,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_VendorSpecificProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,15 +64,15 @@
 | 
			
		|||
		 */
 | 
			
		||||
		typedef struct
 | 
			
		||||
		{
 | 
			
		||||
			USB_Descriptor_Configuration_Header_t    Config;
 | 
			
		||||
			USB_Descriptor_Interface_t               CDC_CCI_Interface;
 | 
			
		||||
			USB_CDC_Descriptor_FunctionalHeader_t    CDC_Functional_Header;
 | 
			
		||||
			USB_CDC_Descriptor_FunctionalACM_t       CDC_Functional_ACM;
 | 
			
		||||
			USB_CDC_Descriptor_FunctionalUnion_t     CDC_Functional_Union;
 | 
			
		||||
			USB_Descriptor_Endpoint_t                CDC_NotificationEndpoint;
 | 
			
		||||
			USB_Descriptor_Interface_t               CDC_DCI_Interface;
 | 
			
		||||
			USB_Descriptor_Endpoint_t                RNDIS_DataOutEndpoint;
 | 
			
		||||
			USB_Descriptor_Endpoint_t                RNDIS_DataInEndpoint;
 | 
			
		||||
			USB_Descriptor_Configuration_Header_t Config;
 | 
			
		||||
			USB_Descriptor_Interface_t            CDC_CCI_Interface;
 | 
			
		||||
			USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
 | 
			
		||||
			USB_CDC_Descriptor_FunctionalACM_t    CDC_Functional_ACM;
 | 
			
		||||
			USB_CDC_Descriptor_FunctionalUnion_t  CDC_Functional_Union;
 | 
			
		||||
			USB_Descriptor_Endpoint_t             CDC_NotificationEndpoint;
 | 
			
		||||
			USB_Descriptor_Interface_t            CDC_DCI_Interface;
 | 
			
		||||
			USB_Descriptor_Endpoint_t             RNDIS_DataOutEndpoint;
 | 
			
		||||
			USB_Descriptor_Endpoint_t             RNDIS_DataInEndpoint;
 | 
			
		||||
		} USB_Descriptor_Configuration_t;
 | 
			
		||||
 | 
			
		||||
	/* Function Prototypes: */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x02,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
	.SubClass               = CDC_CSCP_NoSpecificSubclass,
 | 
			
		||||
	.Protocol               = CDC_CSCP_NoSpecificProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0xEF,
 | 
			
		||||
	.SubClass               = 0x02,
 | 
			
		||||
	.Protocol               = 0x01,
 | 
			
		||||
	.Class                  = USB_CSCP_IADDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_IADDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_IADDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -141,9 +141,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
			.FirstInterfaceIndex    = 0,
 | 
			
		||||
			.TotalInterfaces        = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.IADStrIndex            = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -157,9 +157,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -208,9 +208,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -244,9 +244,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_MouseBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x01,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_ControlSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_ControlProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x01,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_ControlSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_ControlProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x02,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_AudioStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0xEF,
 | 
			
		||||
	.SubClass               = 0x02,
 | 
			
		||||
	.Protocol               = 0x01,
 | 
			
		||||
	.Class                  = USB_CSCP_IADDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_IADDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_IADDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -105,9 +105,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
			.FirstInterfaceIndex    = 0,
 | 
			
		||||
			.TotalInterfaces        = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.IADStrIndex            = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -172,9 +172,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -206,9 +206,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
			.FirstInterfaceIndex    = 2,
 | 
			
		||||
			.TotalInterfaces        = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.IADStrIndex            = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -222,9 +222,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -273,9 +273,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -73,9 +73,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_NonBootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_NonBootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -90,9 +90,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -138,9 +138,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_KeyboardBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,9 +123,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_KeyboardBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -218,9 +218,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = 0x02,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 0,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x01,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_ControlSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_ControlProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -123,9 +123,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints           = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                    = 0x01,
 | 
			
		||||
			.SubClass                 = 0x03,
 | 
			
		||||
			.Protocol                 = 0x00,
 | 
			
		||||
			.Class                    = AUDIO_CSCP_AudioClass,
 | 
			
		||||
			.SubClass                 = AUDIO_CSCP_MIDIStreamingSubclass,
 | 
			
		||||
			.Protocol                 = AUDIO_CSCP_StreamingProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex        = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x08,
 | 
			
		||||
			.SubClass               = 0x06,
 | 
			
		||||
			.Protocol               = 0x50,
 | 
			
		||||
			.Class                  = MS_CSCP_MassStorageClass,
 | 
			
		||||
			.SubClass               = MS_CSCP_SCSITransparentSubclass,
 | 
			
		||||
			.Protocol               = MS_CSCP_BulkOnlyTransportProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = 0x02,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x02,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
	.SubClass               = CDC_CSCP_NoSpecificSubclass,
 | 
			
		||||
	.Protocol               = CDC_CSCP_NoSpecificProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0xFF,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_VendorSpecificProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,7 +41,6 @@
 | 
			
		|||
		#include <stdbool.h>
 | 
			
		||||
 | 
			
		||||
		#include "RNDISEthernet.h"
 | 
			
		||||
		#include "RNDISConstants.h"
 | 
			
		||||
		#include "Ethernet.h"
 | 
			
		||||
 | 
			
		||||
	/* External Variables: */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x02,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
	.SubClass               = CDC_CSCP_NoSpecificSubclass,
 | 
			
		||||
	.Protocol               = CDC_CSCP_NoSpecificProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x02,
 | 
			
		||||
			.SubClass               = 0x02,
 | 
			
		||||
			.Protocol               = 0x01,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_ACMSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_ATCommandProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 2,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x0A,
 | 
			
		||||
			.SubClass               = 0x00,
 | 
			
		||||
			.Protocol               = 0x00,
 | 
			
		||||
			.Class                  = CDC_CSCP_CDCDataClass,
 | 
			
		||||
			.SubClass               = CDC_CSCP_NoDataSubclass,
 | 
			
		||||
			.Protocol               = CDC_CSCP_NoDataProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 | 
			
		||||
 | 
			
		||||
	.USBSpecification       = VERSION_BCD(01.10),
 | 
			
		||||
	.Class                  = 0x00,
 | 
			
		||||
	.SubClass               = 0x00,
 | 
			
		||||
	.Protocol               = 0x00,
 | 
			
		||||
	.Class                  = USB_CSCP_NoDeviceClass,
 | 
			
		||||
	.SubClass               = USB_CSCP_NoDeviceSubclass,
 | 
			
		||||
	.Protocol               = USB_CSCP_NoDeviceProtocol,
 | 
			
		||||
 | 
			
		||||
	.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 | 
			
		|||
 | 
			
		||||
			.TotalEndpoints         = 1,
 | 
			
		||||
 | 
			
		||||
			.Class                  = 0x03,
 | 
			
		||||
			.SubClass               = 0x01,
 | 
			
		||||
			.Protocol               = HID_BOOTP_MouseBootProtocol,
 | 
			
		||||
			.Class                  = HID_CSCP_HIDClass,
 | 
			
		||||
			.SubClass               = HID_CSCP_BootSubclass,
 | 
			
		||||
			.Protocol               = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
 | 
			
		||||
			.InterfaceStrIndex      = NO_DESCRIPTOR
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Host_Interface =
 | 
			
		|||
				.DataINPipeNumber       = 1,
 | 
			
		||||
				.DataOUTPipeNumber      = 2,
 | 
			
		||||
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_BOOTP_MouseBootProtocol,
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
			},
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Joystick_HID_Interface =
 | 
			
		|||
				.DataOUTPipeNumber      = 2,
 | 
			
		||||
				.DataOUTPipeDoubleBank  = false,
 | 
			
		||||
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_BOOTP_NonBootProtocol,
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
				.HIDParserData          = &HIDReportInfo
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface =
 | 
			
		|||
				.DataOUTPipeNumber      = 2,
 | 
			
		||||
				.DataOUTPipeDoubleBank  = false,
 | 
			
		||||
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_BOOTP_KeyboardBootProtocol,
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_CSCP_KeyboardBootProtocol,
 | 
			
		||||
			},
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface =
 | 
			
		|||
				.DataOUTPipeNumber      = 2,
 | 
			
		||||
				.DataOUTPipeDoubleBank  = false,
 | 
			
		||||
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_BOOTP_NonBootProtocol,
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
				.HIDParserData          = &HIDReportInfo
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Interface =
 | 
			
		|||
				.DataOUTPipeNumber      = 2,
 | 
			
		||||
				.DataOUTPipeDoubleBank  = false,
 | 
			
		||||
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_BOOTP_MouseBootProtocol,
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_CSCP_MouseBootProtocol,
 | 
			
		||||
			},
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Interface =
 | 
			
		|||
				.DataOUTPipeNumber      = 2,
 | 
			
		||||
				.DataOUTPipeDoubleBank  = false,
 | 
			
		||||
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_BOOTP_NonBootProtocol,
 | 
			
		||||
				.HIDInterfaceProtocol   = HID_CSCP_NonBootProtocol,
 | 
			
		||||
 | 
			
		||||
				.HIDParserData          = &HIDReportInfo
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,7 +139,7 @@ uint8_t DComp_NextHIDInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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 */
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,9 +42,6 @@
 | 
			
		|||
		#include "GenericHIDHost.h"
 | 
			
		||||
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** Interface Class value for the Human Interface Device class. */
 | 
			
		||||
		#define HID_CLASS                 0x03
 | 
			
		||||
 | 
			
		||||
		/** Pipe number for the HID data IN pipe. */
 | 
			
		||||
		#define HID_DATA_IN_PIPE          1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,9 +133,8 @@ uint8_t DComp_NextJoystickInterface(void* CurrentDescriptor)
 | 
			
		|||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == JOYSTICK_CLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == JOYSTICK_PROTOCOL))
 | 
			
		||||
		/* Check the HID descriptor class, break out if correct class interface found */
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,12 +42,6 @@
 | 
			
		|||
		#include "HIDReport.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define JOYSTICK_DATA_IN_PIPE       1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -119,8 +119,8 @@ uint8_t DComp_NextKeyboardInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == KEYBOARD_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == HID_CSCP_HIDClass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == HID_CSCP_KeyboardBootProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,12 +42,6 @@
 | 
			
		|||
		#include "KeyboardHost.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define KEYBOARD_DATA_IN_PIPE          1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void)
 | 
			
		|||
	uint16_t CurrConfigBytesRem;
 | 
			
		||||
 | 
			
		||||
	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;
 | 
			
		||||
 | 
			
		||||
	/* Retrieve the entire configuration descriptor into the allocated buffer */
 | 
			
		||||
| 
						 | 
				
			
			@ -95,7 +95,7 @@ uint8_t ProcessConfigurationDescriptor(void)
 | 
			
		|||
			}
 | 
			
		||||
 | 
			
		||||
			/* 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 */
 | 
			
		||||
			continue;
 | 
			
		||||
| 
						 | 
				
			
			@ -133,9 +133,8 @@ uint8_t DComp_NextKeyboardInterface(void* CurrentDescriptor)
 | 
			
		|||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == KEYBOARD_PROTOCOL))
 | 
			
		||||
		/* Check the HID descriptor class, break out if correct class interface found */
 | 
			
		||||
		if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == HID_CSCP_HIDClass)
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,12 +42,6 @@
 | 
			
		|||
		#include "HIDReport.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define KEYBOARD_DATA_IN_PIPE          1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ uint8_t GetHIDReportData(void)
 | 
			
		|||
		{
 | 
			
		||||
			.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
 | 
			
		||||
			.bRequest      = REQ_GetDescriptor,
 | 
			
		||||
			.wValue        = (DTYPE_Report << 8),
 | 
			
		||||
			.wValue        = (HID_DTYPE_Report << 8),
 | 
			
		||||
			.wIndex        = 0,
 | 
			
		||||
			.wLength       = HIDReportSize,
 | 
			
		||||
		};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,6 +41,10 @@
 | 
			
		|||
 | 
			
		||||
		#include "KeyboardHostWithParser.h"
 | 
			
		||||
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** HID Report Descriptor Usage Page value for a desktop keyboard. */
 | 
			
		||||
		#define USAGE_PAGE_KEYBOARD             0x07
 | 
			
		||||
 | 
			
		||||
	/* Enums: */
 | 
			
		||||
		/** Enum for the possible return codes of the \ref GetHIDReportData() function. */
 | 
			
		||||
		enum KeyboardHostWithParser_GetHIDReportDataCodes_t
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -129,9 +129,9 @@ uint8_t DComp_NextMIDIStreamingInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == MIDI_STREAMING_SUBCLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MIDI_STREAMING_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == AUDIO_CSCP_AudioClass)            &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == AUDIO_CSCP_MIDIStreamingSubclass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == AUDIO_CSCP_StreamingProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,15 +42,6 @@
 | 
			
		|||
		#include "MIDIHost.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#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;
 | 
			
		||||
 | 
			
		||||
	/* 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 */
 | 
			
		||||
		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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = sizeof(SCSI_Inquiry_Response_t),
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_IN,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_IN,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 6,
 | 
			
		||||
			.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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_IN,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_IN,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 6,
 | 
			
		||||
			.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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = ((uint32_t)Blocks * BlockSize),
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_IN,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_IN,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 10,
 | 
			
		||||
			.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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = ((uint32_t)Blocks * BlockSize),
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_OUT,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_OUT,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 10,
 | 
			
		||||
			.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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = 0,
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_IN,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_IN,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 6,
 | 
			
		||||
			.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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = sizeof(SCSI_Capacity_t),
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_IN,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_IN,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 10,
 | 
			
		||||
			.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 */
 | 
			
		||||
	MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
 | 
			
		||||
		{
 | 
			
		||||
			.Signature          = CBW_SIGNATURE,
 | 
			
		||||
			.Signature          = MS_CBW_SIGNATURE,
 | 
			
		||||
			.DataTransferLength = 0,
 | 
			
		||||
			.Flags              = COMMAND_DIRECTION_DATA_OUT,
 | 
			
		||||
			.Flags              = MS_COMMAND_DIR_DATA_OUT,
 | 
			
		||||
			.LUN                = LUNIndex,
 | 
			
		||||
			.SCSICommandLength  = 6,
 | 
			
		||||
			.SCSICommandData    =
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,8 +120,8 @@ uint8_t DComp_NextMouseInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MOUSE_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == HID_CSCP_HIDClass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == HID_CSCP_MouseBootProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			/* Indicate that the descriptor being searched for has been found */
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,12 +42,6 @@
 | 
			
		|||
		#include "MouseHost.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define MOUSE_DATA_IN_PIPE          1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,9 +133,8 @@ uint8_t DComp_NextMouseInterface(void* CurrentDescriptor)
 | 
			
		|||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MOUSE_PROTOCOL))
 | 
			
		||||
		/* Check the HID descriptor class, break out if correct class interface found */
 | 
			
		||||
		if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CSCP_HIDClass)
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,12 +42,6 @@
 | 
			
		|||
		#include "HIDReport.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define MOUSE_DATA_IN_PIPE          1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -132,10 +132,10 @@ uint8_t DComp_NextBidirectionalPrinterInterface(void* CurrentDescriptor)
 | 
			
		|||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* Check the descriptor class and protocol, break out if correct class/protocol interface found */
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == PRINTER_CLASS)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRINTER_SUBCLASS) &&
 | 
			
		||||
			(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == PRINTER_PROTOCOL))
 | 
			
		||||
		/* Check the descriptor class, subclass and protocol, break out if correct value interface found */
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == PRNT_CSCP_PrinterClass)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRNT_CSCP_PrinterSubclass) &&
 | 
			
		||||
			(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == PRNT_CSCP_BidirectionalProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,15 +38,6 @@
 | 
			
		|||
		#include "Lib/PrinterCommands.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define PRINTER_DATA_IN_PIPE             1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -68,12 +59,12 @@
 | 
			
		|||
		/** Interface index of the Bidirectional Printer interface within the device, once the Configuration
 | 
			
		||||
		 *  Descriptor has been processed.
 | 
			
		||||
		 */
 | 
			
		||||
		uint8_t PrinterInterfaceNumber;
 | 
			
		||||
		extern uint8_t PrinterInterfaceNumber;
 | 
			
		||||
 | 
			
		||||
		/** Interface Alternate Setting index of the Bidirectional Printer interface within the device, once
 | 
			
		||||
		 *  the Configuration Descriptor has been processed.
 | 
			
		||||
		 */
 | 
			
		||||
		uint8_t PrinterAltSetting;
 | 
			
		||||
		extern uint8_t PrinterAltSetting;
 | 
			
		||||
 | 
			
		||||
	/* Function Prototypes: */
 | 
			
		||||
		uint8_t ProcessConfigurationDescriptor(void);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,9 +160,9 @@ uint8_t DComp_NextCDCControlInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CONTROL_SUBCLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CONTROL_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == CDC_CSCP_CDCClass)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_ACMSubclass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_VendorSpecificProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -184,9 +184,9 @@ uint8_t DComp_NextCDCDataInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_DATA_SUBCLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_DATA_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == CDC_CSCP_CDCDataClass)   &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_NoDataSubclass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_NoDataProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,15 +42,6 @@
 | 
			
		|||
		#include "RNDISEthernetHost.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define RNDIS_DATA_IN_PIPE             1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -143,10 +143,10 @@ uint8_t DComp_NextStillImageInterface(void* CurrentDescriptor)
 | 
			
		|||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* Check the descriptor class and protocol, break out if correct class/protocol interface found */
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == SIMAGE_CLASS)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == SIMAGE_SUBCLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == SIMAGE_PROTOCOL))
 | 
			
		||||
		/* Check the descriptor class, subclass and protocol, break out if correct interface found */
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == SI_CSCP_StillImageClass)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == SI_CSCP_StillImageSubclass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == SI_CSCP_BulkOnlyProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,15 +42,6 @@
 | 
			
		|||
		#include "StillImageHost.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define SIMAGE_DATA_IN_PIPE            1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,9 +160,9 @@ uint8_t DComp_NextCDCControlInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CONTROL_SUBCLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CONTROL_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == CDC_CSCP_CDCClass)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_ACMSubclass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_ATCommandProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -184,9 +184,9 @@ uint8_t DComp_NextCDCDataInterface(void* CurrentDescriptor)
 | 
			
		|||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
		/* 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)    &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_DATA_SUBCLASS) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_DATA_PROTOCOL))
 | 
			
		||||
		if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == CDC_CSCP_CDCDataClass)   &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CSCP_NoDataSubclass) &&
 | 
			
		||||
		    (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CSCP_NoDataProtocol))
 | 
			
		||||
		{
 | 
			
		||||
			return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,24 +42,6 @@
 | 
			
		|||
		#include "VirtualSerialHost.h"
 | 
			
		||||
 | 
			
		||||
	/* 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. */
 | 
			
		||||
		#define CDC_DATA_IN_PIPE               1
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue