Reverted Endpoint/Pipe non-sequential configuration hack, placed restriction on the configuration order instead to ensure maximum reliability.
Altered all low level device and host mode demos to ensure that endpoints and pipes are configured in ascending order properly. Rewrote all low level host mode demos' configuration descriptor parser code to ensure that pipes are enumerated in ascending order, and to ensure maximum compatibility with devices. Incremented all device mode demo's device descriptor revision numbers to ensure that any descriptor changes are re-fetched on machines which have enumerated previous versions.
This commit is contained in:
		
							parent
							
								
									a509729b2d
								
							
						
					
					
						commit
						158afe9109
					
				
					 106 changed files with 838 additions and 796 deletions
				
			
		| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2047,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2046,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204E,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
	
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204F,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,7 +91,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2043,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -97,7 +97,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2042,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204D,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2048,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2045,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,7 +110,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2061,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,7 +91,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2041,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204C,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2044,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -103,7 +103,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
	
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2062,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
	
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,7 +43,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	VendorID:               0x03EB,
 | 
			
		||||
	ProductID:              0x2040,
 | 
			
		||||
	ReleaseNumber:          0x0001,
 | 
			
		||||
	ReleaseNumber:          VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	ManufacturerStrIndex:   0x01,
 | 
			
		||||
	ProductStrIndex:        0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2065,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,15 +43,15 @@
 | 
			
		|||
		#include <LUFA/Drivers/USB/USB.h>
 | 
			
		||||
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** Endpoint number of the TMC notification IN endpoint. */
 | 
			
		||||
		#define TMC_NOTIFICATION_EPNUM  2	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the TMC device-to-host data IN endpoint. */
 | 
			
		||||
		#define TMC_IN_EPNUM            3	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the TMC host-to-device data OUT endpoint. */
 | 
			
		||||
		#define TMC_OUT_EPNUM           4	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the TMC notification IN endpoint. */
 | 
			
		||||
		#define TMC_NOTIFICATION_EPNUM  2	
 | 
			
		||||
 | 
			
		||||
		/** Size in bytes of the TMC data endpoints. */
 | 
			
		||||
		#define TMC_IO_EPSIZE           64
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -121,12 +121,12 @@ void EVENT_USB_Device_ConfigurationChanged(void)
 | 
			
		|||
	bool ConfigSuccess = true;
 | 
			
		||||
 | 
			
		||||
	/* Setup TMC In, Out and Notification Endpoints */
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPNUM,  EP_TYPE_BULK, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
 | 
			
		||||
	                                            TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
 | 
			
		||||
	/* Indicate endpoint configuration success or failure */
 | 
			
		||||
	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2047,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2046,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204E,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,23 +42,23 @@
 | 
			
		|||
		#include <avr/pgmspace.h>
 | 
			
		||||
		
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** Endpoint number of the first CDC interface's device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC1_NOTIFICATION_EPNUM        3
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the first CDC interface's device-to-host data IN endpoint. */
 | 
			
		||||
		#define CDC1_TX_EPNUM                  1	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the first CDC interface's host-to-device data OUT endpoint. */
 | 
			
		||||
		#define CDC1_RX_EPNUM                  2	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the second CDC interface's device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC2_NOTIFICATION_EPNUM        4
 | 
			
		||||
		/** Endpoint number of the first CDC interface's device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC1_NOTIFICATION_EPNUM        3
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the second CDC interface's device-to-host data IN endpoint. */
 | 
			
		||||
		#define CDC2_TX_EPNUM                  5	
 | 
			
		||||
		#define CDC2_TX_EPNUM                  4	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the second CDC interface's host-to-device data OUT endpoint. */
 | 
			
		||||
		#define CDC2_RX_EPNUM                  6	
 | 
			
		||||
		#define CDC2_RX_EPNUM                  5	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the second CDC interface's device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC2_NOTIFICATION_EPNUM        6
 | 
			
		||||
 | 
			
		||||
		/** Size in bytes of the CDC device-to-host notification IN endpoints. */
 | 
			
		||||
		#define CDC_NOTIFICATION_EPSIZE        8
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,20 +123,20 @@ void EVENT_USB_Device_ConfigurationChanged(void)
 | 
			
		|||
	bool ConfigSuccess = true;
 | 
			
		||||
 | 
			
		||||
	/* Setup first CDC Interface's Endpoints */
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
 | 
			
		||||
	                                            CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
 | 
			
		||||
	/* Setup second CDC Interface's Endpoints */
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
 | 
			
		||||
	                                            CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
 | 
			
		||||
	/* Reset line encoding baud rates so that the host knows to send new values */
 | 
			
		||||
	LineEncoding1.BaudRateBPS = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204F,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,7 +91,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2043,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,10 +75,10 @@
 | 
			
		|||
					
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** Endpoint number of the Joystick HID reporting IN endpoint. */
 | 
			
		||||
		#define JOYSTICK_EPNUM               1
 | 
			
		||||
		#define JOYSTICK_EPNUM            1
 | 
			
		||||
 | 
			
		||||
		/** Size in bytes of the Joystick HID reporting IN endpoint. */
 | 
			
		||||
		#define JOYSTICK_EPSIZE              8
 | 
			
		||||
		#define JOYSTICK_EPSIZE           8
 | 
			
		||||
 | 
			
		||||
		/** Descriptor header type value, to indicate a HID class HID descriptor. */
 | 
			
		||||
		#define DTYPE_HID                 0x21
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,7 +98,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2042,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -131,7 +131,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204D,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2048,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),,
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,11 +60,11 @@
 | 
			
		|||
		/** Audio class descriptor jack type value for an external (physical) MIDI input or output jack. */
 | 
			
		||||
		#define JACKTYPE_EXTERNAL           0x02
 | 
			
		||||
		
 | 
			
		||||
		/** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
 | 
			
		||||
		#define MIDI_STREAM_OUT_EPNUM       1
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
 | 
			
		||||
		#define MIDI_STREAM_IN_EPNUM        2
 | 
			
		||||
		#define MIDI_STREAM_IN_EPNUM        1
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
 | 
			
		||||
		#define MIDI_STREAM_OUT_EPNUM       2
 | 
			
		||||
 | 
			
		||||
		/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
 | 
			
		||||
		#define MIDI_STREAM_EPSIZE          64
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,10 +94,10 @@ void EVENT_USB_Device_ConfigurationChanged(void)
 | 
			
		|||
	bool ConfigSuccess = true;
 | 
			
		||||
 | 
			
		||||
	/* Setup MIDI Data Endpoints */
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
 | 
			
		||||
	                                            MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
 | 
			
		||||
	                                            MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
	ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
 | 
			
		||||
	                                            MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
 | 
			
		||||
 | 
			
		||||
	/* Indicate endpoint configuration success or failure */
 | 
			
		||||
	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);	
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2045,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,7 +91,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2041,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x204C,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,21 +42,21 @@
 | 
			
		|||
		#include <avr/pgmspace.h>
 | 
			
		||||
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** Endpoint number of the CDC device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC_NOTIFICATION_EPNUM         3
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the CDC device-to-host data IN endpoint. */
 | 
			
		||||
		#define CDC_TX_EPNUM                   1	
 | 
			
		||||
 | 
			
		||||
		/** Endpoint number of the CDC host-to-device data OUT endpoint. */
 | 
			
		||||
		#define CDC_RX_EPNUM                   2	
 | 
			
		||||
 | 
			
		||||
		/** Size in bytes of the CDC device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC_NOTIFICATION_EPSIZE        8
 | 
			
		||||
		/** Endpoint number of the CDC device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC_NOTIFICATION_EPNUM         3
 | 
			
		||||
 | 
			
		||||
		/** Size in bytes of the CDC data IN and OUT endpoints. */
 | 
			
		||||
		#define CDC_TXRX_EPSIZE                64
 | 
			
		||||
 | 
			
		||||
		/** Size in bytes of the CDC device-to-host notification IN endpoint. */
 | 
			
		||||
		#define CDC_NOTIFICATION_EPSIZE        8
 | 
			
		||||
 | 
			
		||||
	/* Type Defines: */
 | 
			
		||||
		/** Type define for a CDC class-specific functional header descriptor. This indicates to the host that the device
 | 
			
		||||
		 *  contains one or more CDC functional data descriptors, which give the CDC interface's capabilities and configuration.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 | 
			
		|||
		
 | 
			
		||||
	.VendorID               = 0x03EB,
 | 
			
		||||
	.ProductID              = 0x2044,
 | 
			
		||||
	.ReleaseNumber          = 0x0000,
 | 
			
		||||
	.ReleaseNumber          = VERSION_BCD(00.01),
 | 
			
		||||
		
 | 
			
		||||
	.ManufacturerStrIndex   = 0x01,
 | 
			
		||||
	.ProductStrIndex        = 0x02,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue