aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel/MassStorage/MassStorage.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-10-02 07:40:24 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-10-02 07:40:24 +0000
commitb7eead83aab675ebfe583c5beb1662e2d1833cb8 (patch)
tree3e0202b4a972dabfe0bc45afa49b475ee191138c /Demos/Device/LowLevel/MassStorage/MassStorage.c
parent3ecc4629540c72f1db293c5725faf3106935731d (diff)
downloadlufa-b7eead83aab675ebfe583c5beb1662e2d1833cb8.tar.gz
lufa-b7eead83aab675ebfe583c5beb1662e2d1833cb8.tar.bz2
lufa-b7eead83aab675ebfe583c5beb1662e2d1833cb8.zip
Cleanups to the Device mode Mass Storage demo applications' SCSI routines.
Diffstat (limited to 'Demos/Device/LowLevel/MassStorage/MassStorage.c')
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c
index cf276fd81..76aa337c7 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.c
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c
@@ -189,15 +189,15 @@ void MassStorage_Task(void)
if (CommandBlock.Flags & COMMAND_DIRECTION_DATA_IN)
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
- /* Decode the received SCSI command */
- SCSI_DecodeSCSICommand();
+ /* Decode the received SCSI command, set returned status code */
+ CommandStatus.Status = SCSI_DecodeSCSICommand() ? Command_Pass : Command_Fail;
/* 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();