X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6933f2e1a543b066ebe734bd126a7ff2f1c2777f..59becad82f18c158063ef450d65fefa332857e86:/Demos/Device/MassStorage/SCSI.c?ds=inline diff --git a/Demos/Device/MassStorage/SCSI.c b/Demos/Device/MassStorage/SCSI.c index d50f63d91..5993a546d 100644 --- a/Demos/Device/MassStorage/SCSI.c +++ b/Demos/Device/MassStorage/SCSI.c @@ -43,31 +43,31 @@ */ SCSI_Inquiry_Response_t InquiryData = { - DeviceType: 0, - PeripheralQualifier: 0, + .DeviceType = DEVICE_TYPE_BLOCK, + .PeripheralQualifier = 0, - Removable: true, + .Removable = true, - Version: 0, + .Version = 0, - ResponseDataFormat: 2, - NormACA: false, - TrmTsk: false, - AERC: false, + .ResponseDataFormat = 2, + .NormACA = false, + .TrmTsk = false, + .AERC = false, - AdditionalLength: 0x1F, + .AdditionalLength = 0x1F, - SoftReset: false, - CmdQue: false, - Linked: false, - Sync: false, - WideBus16Bit: false, - WideBus32Bit: false, - RelAddr: false, + .SoftReset = false, + .CmdQue = false, + .Linked = false, + .Sync = false, + .WideBus16Bit = false, + .WideBus32Bit = false, + .RelAddr = false, - VendorID: "LUFA", - ProductID: "Dataflash Disk", - RevisionID: {'0','.','0','0'}, + .VendorID = "LUFA", + .ProductID = "Dataflash Disk", + .RevisionID = {'0','.','0','0'}, }; /** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE @@ -75,8 +75,8 @@ SCSI_Inquiry_Response_t InquiryData = */ SCSI_Request_Sense_Response_t SenseData = { - ResponseCode: 0x70, - AdditionalLength: 0x0A, + .ResponseCode = 0x70, + .AdditionalLength = 0x0A, }; @@ -166,15 +166,15 @@ static bool SCSI_Command_Inquiry(void) } /* Write the INQUIRY data to the endpoint */ - Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, AbortOnMassStoreReset); + Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, StreamCallback_AbortOnMassStoreReset); uint8_t PadBytes[AllocationLength - BytesTransferred]; /* Pad out remaining bytes with 0x00 */ - Endpoint_Write_Stream_LE(&PadBytes, (AllocationLength - BytesTransferred), AbortOnMassStoreReset); + Endpoint_Write_Stream_LE(&PadBytes, (AllocationLength - BytesTransferred), StreamCallback_AbortOnMassStoreReset); /* Finalize the stream transfer to send the last packet */ - Endpoint_ClearCurrentBank(); + Endpoint_ClearIN(); /* Succeed the command and update the bytes transferred counter */ CommandBlock.DataTransferLength -= BytesTransferred; @@ -193,15 +193,15 @@ 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, AbortOnMassStoreReset); + Endpoint_Write_Stream_LE(&SenseData, BytesTransferred, StreamCallback_AbortOnMassStoreReset); uint8_t PadBytes[AllocationLength - BytesTransferred]; /* Pad out remaining bytes with 0x00 */ - Endpoint_Write_Stream_LE(&PadBytes, (AllocationLength - BytesTransferred), AbortOnMassStoreReset); + Endpoint_Write_Stream_LE(&PadBytes, (AllocationLength - BytesTransferred), StreamCallback_AbortOnMassStoreReset); /* Finalize the stream transfer to send the last packet */ - Endpoint_ClearCurrentBank(); + Endpoint_ClearIN(); /* Succeed the command and update the bytes transferred counter */ CommandBlock.DataTransferLength -= BytesTransferred; @@ -227,7 +227,7 @@ static bool SCSI_Command_Read_Capacity_10(void) return false; /* Send the endpoint data packet to the host */ - Endpoint_ClearCurrentBank(); + Endpoint_ClearIN(); /* Succeed the command and update the bytes transferred counter */ CommandBlock.DataTransferLength -= 8;