aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-08-18 10:33:21 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-08-18 10:33:21 +0000
commit4f114e576694b6b49931d5f14874df6c361d4267 (patch)
treecba14b1e3024c7c252b4a1e2cc37c2b200e34042 /Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h
parentf4de17207ea6a28a6947ed6f3170b6689a2619d0 (diff)
downloadlufa-4f114e576694b6b49931d5f14874df6c361d4267.tar.gz
lufa-4f114e576694b6b49931d5f14874df6c361d4267.tar.bz2
lufa-4f114e576694b6b49931d5f14874df6c361d4267.zip
Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger).
Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant SCSI_Codes.h file as these values are part of the MassStorage Class Driver.
Diffstat (limited to 'Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h')
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h
index 22c3a1d44..6932a8152 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h
@@ -43,6 +43,7 @@
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/USB/Class/MassStorage.h>
+ #include "StandaloneProgrammer.h"
#include "Descriptors.h"
#include "DataflashManager.h"
@@ -55,9 +56,9 @@
* \param[in] acode New SCSI additional sense key to set the additional sense code to
* \param[in] aqual New SCSI additional sense key qualifier to set the additional sense qualifier code to
*/
- #define SCSI_SET_SENSE(key, acode, aqual) MACROS{ SenseData.SenseKey = key; \
- SenseData.AdditionalSenseCode = acode; \
- SenseData.AdditionalSenseQualifier = aqual; }MACROE
+ #define SCSI_SET_SENSE(Key, Acode, Aqual) MACROS{ SenseData.SenseKey = (Key); \
+ SenseData.AdditionalSenseCode = (Acode); \
+ SenseData.AdditionalSenseQualifier = (Aqual); }MACROE
/** Macro for the \ref SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */
#define DATA_READ true
@@ -76,12 +77,12 @@
bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
#if defined(INCLUDE_FROM_SCSI_C)
- static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const bool IsDataRead);
+ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const bool IsDataRead);
#endif
#endif