- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
MASS_STORAGE_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
/* Indicate endpoint configuration success or failure */
MASS_STORAGE_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
/* Indicate endpoint configuration success or failure */
/* Indicate to the host the number of supported LUNs (virtual disks) on the device */
Endpoint_Write_Byte(TOTAL_LUNS - 1);
/* Indicate to the host the number of supported LUNs (virtual disks) on the device */
Endpoint_Write_Byte(TOTAL_LUNS - 1);
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
/* Decode the received SCSI command, set returned status code */
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
/* Decode the received SCSI command, set returned status code */
/* Load in the CBW tag into the CSW to link them together */
CommandStatus.Tag = CommandBlock.Tag;
/* Load in the data residue counter into the CSW */
CommandStatus.DataTransferResidue = CommandBlock.DataTransferLength;
/* Load in the CBW tag into the CSW to link them together */
CommandStatus.Tag = CommandBlock.Tag;
/* Load in the data residue counter into the CSW */
CommandStatus.DataTransferResidue = CommandBlock.DataTransferLength;
/* Stall the selected data pipe if command failed (if data is still to be transferred) */
if ((CommandStatus.Status == Command_Fail) && (CommandStatus.DataTransferResidue))
Endpoint_StallTransaction();
/* Stall the selected data pipe if command failed (if data is still to be transferred) */
if ((CommandStatus.Status == Command_Fail) && (CommandStatus.DataTransferResidue))
Endpoint_StallTransaction();
/* Reset the data endpoint banks */
Endpoint_ResetFIFO(MASS_STORAGE_OUT_EPNUM);
Endpoint_ResetFIFO(MASS_STORAGE_IN_EPNUM);
/* Reset the data endpoint banks */
Endpoint_ResetFIFO(MASS_STORAGE_OUT_EPNUM);
Endpoint_ResetFIFO(MASS_STORAGE_IN_EPNUM);
Endpoint_StallTransaction();
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
Endpoint_StallTransaction();
Endpoint_StallTransaction();
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
Endpoint_StallTransaction();
Endpoint_Read_Stream_LE(&CommandBlock.SCSICommandData,
CommandBlock.SCSICommandLength,
StreamCallback_AbortOnMassStoreReset);
Endpoint_Read_Stream_LE(&CommandBlock.SCSICommandData,
CommandBlock.SCSICommandLength,
StreamCallback_AbortOnMassStoreReset);
/* Check if the current command is being aborted by the host */
if (IsMassStoreReset)
return false;
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearOUT();
/* Check if the current command is being aborted by the host */
if (IsMassStoreReset)
return false;
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearOUT();
/* Write the CSW to the endpoint */
Endpoint_Write_Stream_LE(&CommandStatus, sizeof(CommandStatus),
StreamCallback_AbortOnMassStoreReset);
/* Write the CSW to the endpoint */
Endpoint_Write_Stream_LE(&CommandStatus, sizeof(CommandStatus),
StreamCallback_AbortOnMassStoreReset);
* if a Mass Storage Reset request has been issued to the control endpoint.
*/
uint8_t StreamCallback_AbortOnMassStoreReset(void)
* if a Mass Storage Reset request has been issued to the control endpoint.
*/
uint8_t StreamCallback_AbortOnMassStoreReset(void)