@ -61,7 +61,7 @@ uint8_t ProcessConfigurationDescriptor(void)
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						/* Get the printer interface from the configuration descriptor */ 
	/* Get the printer interface from the configuration descriptor */ 
 
			
		
	
		
		
			
				
					
						if  ( ( ErrorCode  =  USB_GetNextDescriptorComp ( & ConfigDescriptorSize ,  & ConfigDescriptorData , 
	if  ( ( ErrorCode  =  USB_GetNextDescriptorComp ( & ConfigDescriptorSize ,  & ConfigDescriptorData , 
 
			
		
	
		
		
			
				
					
						                                           ) ) ) 
	                                           DComp_ NextBidirectionalPrinterInterface) ) ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
						{ 
	{ 
 
			
		
	
		
		
			
				
					
							/* Descriptor not found, error out */ 
		/* Descriptor not found, error out */ 
 
			
		
	
		
		
			
				
					
							return  NoInterfaceFound ; 
		return  NoInterfaceFound ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -70,12 +70,12 @@ uint8_t ProcessConfigurationDescriptor(void)
 
			
		
	
		
		
			
				
					
						PrinterInterfaceNumber  =  DESCRIPTOR_CAST ( ConfigDescriptorData ,  USB_Descriptor_Interface_t ) . InterfaceNumber ; 
	PrinterInterfaceNumber  =  DESCRIPTOR_CAST ( ConfigDescriptorData ,  USB_Descriptor_Interface_t ) . InterfaceNumber ; 
 
			
		
	
		
		
			
				
					
						PrinterAltSetting       =  DESCRIPTOR_CAST ( ConfigDescriptorData ,  USB_Descriptor_Interface_t ) . AlternateSetting ; 
	PrinterAltSetting       =  DESCRIPTOR_CAST ( ConfigDescriptorData ,  USB_Descriptor_Interface_t ) . AlternateSetting ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
						/* Get the IN and OUT data endpoints for the  mass storage  interface */
	/* Get the IN and OUT data endpoints for the  printer  interface */
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
						while  ( FoundEndpoints  ! =  ( ( 1  < <  PRINTER_DATA_OUT_PIPE )  |  ( 1  < <  PRINTER_DATA_IN_PIPE ) ) ) 
	while  ( FoundEndpoints  ! =  ( ( 1  < <  PRINTER_DATA_OUT_PIPE )  |  ( 1  < <  PRINTER_DATA_IN_PIPE ) ) ) 
 
			
		
	
		
		
			
				
					
						{ 
	{ 
 
			
		
	
		
		
			
				
					
							/* Fetch the next bulk endpoint from the current printer interface */ 
		/* Fetch the next bulk endpoint from the current printer interface */ 
 
			
		
	
		
		
			
				
					
							if  ( ( ErrorCode  =  USB_GetNextDescriptorComp ( & ConfigDescriptorSize ,  & ConfigDescriptorData , 
		if  ( ( ErrorCode  =  USB_GetNextDescriptorComp ( & ConfigDescriptorSize ,  & ConfigDescriptorData , 
 
			
		
	
		
		
			
				
					
							                                           ) ) ) 
		                                           DComp_ NextInterfaceBulkDataEndpoint) ) ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
							{ 
		{ 
 
			
		
	
		
		
			
				
					
								/* Descriptor not found, error out */ 
			/* Descriptor not found, error out */ 
 
			
		
	
		
		
			
				
					
								return  NoEndpointFound ; 
			return  NoEndpointFound ; 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -112,16 +112,16 @@ uint8_t ProcessConfigurationDescriptor(void)
 
			
		
	
		
		
			
				
					
						return  SuccessfulConfigRead ; 
	return  SuccessfulConfigRead ; 
 
			
		
	
		
		
			
				
					
					} }  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					uint8_t  ( void *  CurrentDescriptor ) uint8_t  DComp_ NextBidirectionalPrinterInterface( void *  CurrentDescriptor )  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					{ {  
			
		
	
		
		
			
				
					
						/* PURPOSE: Find next  B idirectional protocol printer class interface descriptor */
	/* PURPOSE: Find next  b idirectional protocol printer class interface descriptor */
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
						if  ( DESCRIPTOR_TYPE ( CurrentDescriptor )  = =  DTYPE_Interface ) 
	if  ( DESCRIPTOR_TYPE ( CurrentDescriptor )  = =  DTYPE_Interface ) 
 
			
		
	
		
		
			
				
					
						{ 
	{ 
 
			
		
	
		
		
			
				
					
							/* Check the descriptor class and protocol, break out if correct class/protocol interface found */ 
		/* Check the descriptor class and protocol, break out if correct class/protocol interface found */ 
 
			
		
	
		
		
			
				
					
							if  ( ( DESCRIPTOR_CAST ( CurrentDescriptor ,  USB_Descriptor_Interface_t ) . Class     = =  PRINTER_CLASS )     & & 
		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 ) . SubClass  = =  PRINTER_SUBCLASS )  & & 
 
			
		
	
		
		
			
				
					
								( DESCRIPTOR_CAST ( CurrentDescriptor ,  USB_Descriptor_Interface_t ) . Protocol  = =  PR OTOCOL_BIDIRECTIONA L) ) 
			( DESCRIPTOR_CAST ( CurrentDescriptor ,  USB_Descriptor_Interface_t ) . Protocol  = =  PR INTER_PROTOCO L) ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
							{ 
		{ 
 
			
		
	
		
		
			
				
					
								return  DESCRIPTOR_SEARCH_Found ; 
			return  DESCRIPTOR_SEARCH_Found ; 
 
			
		
	
		
		
			
				
					
							} 
		} 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -130,7 +130,7 @@ uint8_t NextBidirectionalPrinterInterface(void* CurrentDescriptor)
 
			
		
	
		
		
			
				
					
						return  DESCRIPTOR_SEARCH_NotFound ; 
	return  DESCRIPTOR_SEARCH_NotFound ; 
 
			
		
	
		
		
			
				
					
					} }  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					uint8_t  ( void *  CurrentDescriptor ) uint8_t  DComp_ NextInterfaceBulkDataEndpoint( void *  CurrentDescriptor )  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					{ {  
			
		
	
		
		
			
				
					
						/* PURPOSE: Find next interface bulk endpoint descriptor before next interface descriptor */ 
	/* PURPOSE: Find next interface bulk endpoint descriptor before next interface descriptor */