aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/MassStorage
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-03-26 03:22:02 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-03-26 03:22:02 +0000
commitca641bba8356851dd8144bde4a10bc5e5c647930 (patch)
treefee141b265f00a987e34751c5ec5095b4edc333b /Demos/Device/MassStorage
parent1c9092a8a6db41709b9cb77534f06011868baf01 (diff)
downloadlufa-ca641bba8356851dd8144bde4a10bc5e5c647930.tar.gz
lufa-ca641bba8356851dd8144bde4a10bc5e5c647930.tar.bz2
lufa-ca641bba8356851dd8144bde4a10bc5e5c647930.zip
Corrected bitfields -- the smallest datatype required for each bitfield is now used, rather than relying on GCC to truncate unused bytes in bitfields (thanks to Walt Sacuta).
Diffstat (limited to 'Demos/Device/MassStorage')
-rw-r--r--Demos/Device/MassStorage/SCSI.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/Demos/Device/MassStorage/SCSI.h b/Demos/Device/MassStorage/SCSI.h
index a0be39001..58eea1b41 100644
--- a/Demos/Device/MassStorage/SCSI.h
+++ b/Demos/Device/MassStorage/SCSI.h
@@ -74,31 +74,31 @@
*/
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];
@@ -114,11 +114,11 @@
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;