X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6933f2e1a543b066ebe734bd126a7ff2f1c2777f..af02b5b0c953931ce8b8925439972b1b4bd1d77e:/Demos/Host/MassStorageHost/MassStoreCommands.c diff --git a/Demos/Host/MassStorageHost/MassStoreCommands.c b/Demos/Host/MassStorageHost/MassStoreCommands.c index 700d969db..0d88acbd5 100644 --- a/Demos/Host/MassStorageHost/MassStoreCommands.c +++ b/Demos/Host/MassStorageHost/MassStoreCommands.c @@ -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();