X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/9f7883fa2b78fd7907162987fc65b71d3c6b19fa..f555ad7ced743a19eb1eefaf5eaf536fcbe58d80:/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c diff --git a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c index 63f1ec3b4..0400cc2c6 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c +++ b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. + Copyright (C) Dean Camera, 2011. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -166,12 +166,10 @@ static bool SCSI_Command_Inquiry(void) } /* Write the INQUIRY data to the endpoint */ - Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, StreamCallback_AbortOnMassStoreReset); - - uint8_t PadBytes[AllocationLength - BytesTransferred]; + Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, NULL); /* Pad out remaining bytes with 0x00 */ - Endpoint_Write_Stream_LE(&PadBytes, sizeof(PadBytes), StreamCallback_AbortOnMassStoreReset); + Endpoint_Null_Stream((AllocationLength - BytesTransferred), NULL); /* Finalize the stream transfer to send the last packet */ Endpoint_ClearIN(); @@ -193,12 +191,10 @@ static bool SCSI_Command_Request_Sense(void) uint8_t BytesTransferred = (AllocationLength < sizeof(SenseData))? AllocationLength : sizeof(SenseData); /* Send the SENSE data - this indicates to the host the status of the last command */ - Endpoint_Write_Stream_LE(&SenseData, BytesTransferred, StreamCallback_AbortOnMassStoreReset); - - uint8_t PadBytes[AllocationLength - BytesTransferred]; + Endpoint_Write_Stream_LE(&SenseData, BytesTransferred, NULL); /* Pad out remaining bytes with 0x00 */ - Endpoint_Write_Stream_LE(&PadBytes, sizeof(PadBytes), StreamCallback_AbortOnMassStoreReset); + Endpoint_Null_Stream((AllocationLength - BytesTransferred), NULL); /* Finalize the stream transfer to send the last packet */ Endpoint_ClearIN();