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
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue