Add call to MassStore_WaitForDataReceived() in MassStore_GetReturnedStatus() to ensure that the CSW has been received in the extended MSC timeout period before continuing, to prevent long processing delays from causing the MassStore_GetReturnedStatus() to early-abort.
This commit is contained in:
		
							parent
							
								
									58f550dfb3
								
							
						
					
					
						commit
						01d388f293
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -215,6 +215,10 @@ static uint8_t MassStore_GetReturnedStatus(void)
 | 
			
		|||
{
 | 
			
		||||
	uint8_t ErrorCode = PIPE_RWSTREAM_ERROR_NoError;
 | 
			
		||||
 | 
			
		||||
	/* If an error in the command ocurred, abort */
 | 
			
		||||
	if (MassStore_WaitForDataReceived() != NoError)
 | 
			
		||||
	  return;
 | 
			
		||||
 | 
			
		||||
	/* Select the IN data pipe for data reception */
 | 
			
		||||
	Pipe_SelectPipe(MASS_STORE_DATA_IN_PIPE);
 | 
			
		||||
	Pipe_Unfreeze();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue