X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/ed031c1df2f5b053b9cd9f48c63e66a42b7c049e..76d5e99bb8765030a7f99e7b5adf9bae7f92e0ba:/Demos/Device/MassStorage/SCSI.h diff --git a/Demos/Device/MassStorage/SCSI.h b/Demos/Device/MassStorage/SCSI.h index a0be39001..d7693cafb 100644 --- a/Demos/Device/MassStorage/SCSI.h +++ b/Demos/Device/MassStorage/SCSI.h @@ -67,38 +67,44 @@ /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be written to the storage medium. */ #define DATA_WRITE false + + /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a Block Media device. */ + #define DEVICE_TYPE_BLOCK 0x00 + /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a CD-ROM device. */ + #define DEVICE_TYPE_CDROM 0x05 + /* Type Defines: */ /** Type define for a SCSI response structure to a SCSI INQUIRY command. For details of the * structure contents, refer to the SCSI specifications. */ typedef struct { - unsigned int DeviceType : 5; - unsigned int PeripheralQualifier : 3; + unsigned char DeviceType : 5; + unsigned char PeripheralQualifier : 3; - unsigned int _RESERVED1 : 7; - unsigned int Removable : 1; + unsigned char _RESERVED1 : 7; + unsigned char Removable : 1; uint8_t Version; - unsigned int ResponseDataFormat : 4; - unsigned int _RESERVED2 : 1; - unsigned int NormACA : 1; - unsigned int TrmTsk : 1; - unsigned int AERC : 1; + unsigned char ResponseDataFormat : 4; + unsigned char _RESERVED2 : 1; + unsigned char NormACA : 1; + unsigned char TrmTsk : 1; + unsigned char AERC : 1; uint8_t AdditionalLength; uint8_t _RESERVED3[2]; - unsigned int SoftReset : 1; - unsigned int CmdQue : 1; - unsigned int _RESERVED4 : 1; - unsigned int Linked : 1; - unsigned int Sync : 1; - unsigned int WideBus16Bit : 1; - unsigned int WideBus32Bit : 1; - unsigned int RelAddr : 1; + unsigned char SoftReset : 1; + unsigned char CmdQue : 1; + unsigned char _RESERVED4 : 1; + unsigned char Linked : 1; + unsigned char Sync : 1; + unsigned char WideBus16Bit : 1; + unsigned char WideBus32Bit : 1; + unsigned char RelAddr : 1; uint8_t VendorID[8]; uint8_t ProductID[16]; @@ -110,15 +116,15 @@ */ typedef struct { - uint8_t ResponseCode; + uint8_t ResponseCode; - uint8_t SegmentNumber; + uint8_t SegmentNumber; - unsigned int SenseKey : 4; - unsigned int _RESERVED1 : 1; - unsigned int ILI : 1; - unsigned int EOM : 1; - unsigned int FileMark : 1; + unsigned char SenseKey : 4; + unsigned char _RESERVED1 : 1; + unsigned char ILI : 1; + unsigned char EOM : 1; + unsigned char FileMark : 1; uint8_t Information[4]; uint8_t AdditionalLength;