X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6d53cdba8367a6f589302f913a58d55650f45d97..4cc7f5200beef90c39c8c8310ed7c8b849afb4d9:/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h index f7e957ab7..96489ab82 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h @@ -46,7 +46,6 @@ #include "MassStorageKeyboard.h" #include "Descriptors.h" #include "DataflashManager.h" - #include "SCSI_Codes.h" /* Macros: */ /** Macro to set the current SCSI sense data to the given key, additional sense code and additional sense qualifier. This @@ -57,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 @@ -74,14 +73,15 @@ #define DEVICE_TYPE_CDROM 0x05 /* Function Prototypes: */ - bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo); + bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo); #if defined(INCLUDE_FROM_SCSI_C) - static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo); - static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo); - static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo); - static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo); - static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* 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