@ -294,14 +294,11 @@ void SendNextReport(void)
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					{ 
 
					 
					 
					 
					{ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						static  USB_KeyboardReport_Data_t  PrevKeyboardReportData ; 
 
					 
					 
					 
						static  USB_KeyboardReport_Data_t  PrevKeyboardReportData ; 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						USB_KeyboardReport_Data_t         KeyboardReportData ; 
 
					 
					 
					 
						USB_KeyboardReport_Data_t         KeyboardReportData ; 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						bool                              SendReport  =  tru e; 
 
					 
					 
					 
						bool                              SendReport  =  fals e; 
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						/* Create the next keyboard report for transmission to the host */ 
 
					 
					 
					 
						/* Create the next keyboard report for transmission to the host */ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						CreateKeyboardReport ( & KeyboardReportData ) ; 
 
					 
					 
					 
						CreateKeyboardReport ( & KeyboardReportData ) ; 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						/* Check to see if the report data has changed - if so a report MUST be sent */ 
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						SendReport  =  ( memcmp ( & PrevKeyboardReportData ,  & KeyboardReportData ,  sizeof ( USB_KeyboardReport_Data_t ) )  ! =  0 ) ; 
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						/* Check if the idle period is set and has elapsed */ 
 
					 
					 
					 
						/* Check if the idle period is set and has elapsed */ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						if  ( IdleCount  & &  ( ! ( IdleMSRemaining ) ) ) 
 
					 
					 
					 
						if  ( IdleCount  & &  ( ! ( IdleMSRemaining ) ) ) 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						{ 
 
					 
					 
					 
						{ 
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -311,6 +308,11 @@ void SendNextReport(void)
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
							/* Idle period is set and has elapsed, must send a report to the host */ 
 
					 
					 
					 
							/* Idle period is set and has elapsed, must send a report to the host */ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
							SendReport  =  true ; 
 
					 
					 
					 
							SendReport  =  true ; 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						} 
 
					 
					 
					 
						} 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
						else 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
						{ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
							/* Check to see if the report data has changed - if so a report MUST be sent */ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
							SendReport  =  ( memcmp ( & PrevKeyboardReportData ,  & KeyboardReportData ,  sizeof ( USB_KeyboardReport_Data_t ) )  ! =  0 ) ; 	
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
						} 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						/* Select the Keyboard Report Endpoint */ 
 
					 
					 
					 
						/* Select the Keyboard Report Endpoint */ 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
						Endpoint_SelectEndpoint ( KEYBOARD_IN_EPADDR ) ; 
 
					 
					 
					 
						Endpoint_SelectEndpoint ( KEYBOARD_IN_EPADDR ) ;