X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/4d3a594f3e26447ba223ac58292c9a77480ceed3..5d8cdd9bea07acd276b260b34bea299a45a9088a:/Demos/Device/LowLevel/MassStorage/MassStorage.c?ds=inline diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c index 3f992c225..ebb8e5c48 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.c +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c @@ -218,9 +218,6 @@ void MassStorage_Task(void) Endpoint_ClearStall(); Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM); Endpoint_ClearStall(); - - /* Clear the abort transfer flag */ - IsMassStoreReset = false; } /* Indicate ready */ @@ -232,6 +229,9 @@ void MassStorage_Task(void) LEDs_SetAllLEDs(LEDMASK_USB_ERROR); } } + + /* Clear the abort transfer flag */ + IsMassStoreReset = false; } } @@ -254,9 +254,9 @@ static bool ReadInCommandBlock(void) return false; /* Verify the command block - abort if invalid */ - if ((CommandBlock.Signature != CBW_SIGNATURE) || - (CommandBlock.LUN >= TOTAL_LUNS) || - (CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH)) + if ((CommandBlock.Signature != CBW_SIGNATURE) || + (CommandBlock.LUN >= TOTAL_LUNS) || + (CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH)) { /* Stall both data pipes until reset by host */ Endpoint_StallTransaction();