diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-03-11 06:47:39 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-03-11 06:47:39 +0000 |
commit | c8a438d66c40f444b5b5fa6a814492fef75886ed (patch) | |
tree | 96fedf9dcc53d7bea53f4f01dd6a7cb3a73b6c21 /LUFA/Drivers/USB/Class | |
parent | e4b3e3fc65c0f0bbb10047c159a4771d6359e9b6 (diff) | |
download | lufa-c8a438d66c40f444b5b5fa6a814492fef75886ed.tar.gz lufa-c8a438d66c40f444b5b5fa6a814492fef75886ed.tar.bz2 lufa-c8a438d66c40f444b5b5fa6a814492fef75886ed.zip |
Add structure padding to the appropriate descriptor structures to maintain correct alignments on larger architectures.
Fix EVK1101 swapped joystick Right/Down masks.
Diffstat (limited to 'LUFA/Drivers/USB/Class')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/Audio.h | 34 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/CDC.h | 14 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/HID.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/MIDI.h | 18 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/MassStorage.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/RNDIS.h | 26 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/StillImage.h | 2 |
7 files changed, 55 insertions, 55 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h index ab6428022..c838411f0 100644 --- a/LUFA/Drivers/USB/Class/Common/Audio.h +++ b/LUFA/Drivers/USB/Class/Common/Audio.h @@ -295,7 +295,7 @@ uint8_t ChannelStrIndex; /**< Index of a string descriptor describing this channel within the device. */ uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_Audio_Descriptor_InputTerminal_t; + } ATTR_PACKED USB_Audio_Descriptor_InputTerminal_t; /** \brief Audio class-specific Input Terminal Descriptor (USB-IF naming conventions). * @@ -326,7 +326,7 @@ uint8_t iChannelNames; /**< Index of a string descriptor describing this channel within the device. */ uint8_t iTerminal; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_Audio_StdDescriptor_InputTerminal_t; + } ATTR_PACKED USB_Audio_StdDescriptor_InputTerminal_t; /** \brief Audio class-specific Output Terminal Descriptor (LUFA naming conventions). * @@ -351,7 +351,7 @@ uint8_t SourceID; /**< ID value of the unit this terminal's audio is sourced from. */ uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_Audio_Descriptor_OutputTerminal_t; + } ATTR_PACKED USB_Audio_Descriptor_OutputTerminal_t; /** \brief Audio class-specific Output Terminal Descriptor (USB-IF naming conventions). * @@ -380,7 +380,7 @@ uint8_t bSourceID; /**< ID value of the unit this terminal's audio is sourced from. */ uint8_t iTerminal; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_Audio_StdDescriptor_OutputTerminal_t; + } ATTR_PACKED USB_Audio_StdDescriptor_OutputTerminal_t; /** \brief Audio class-specific Interface Descriptor (LUFA naming conventions). * @@ -402,7 +402,7 @@ uint8_t InCollection; /**< Total number of Audio Streaming interfaces linked to this Audio Control interface (must be 1). */ uint8_t InterfaceNumber; /**< Interface number of the associated Audio Streaming interface. */ - } USB_Audio_Descriptor_Interface_AC_t; + } ATTR_PACKED USB_Audio_Descriptor_Interface_AC_t; /** \brief Audio class-specific Interface Descriptor (USB-IF naming conventions). * @@ -429,7 +429,7 @@ uint8_t bInCollection; /**< Total number of Audio Streaming interfaces linked to this Audio Control interface (must be 1). */ uint8_t bInterfaceNumbers; /**< Interface number of the associated Audio Streaming interface. */ - } USB_Audio_StdDescriptor_Interface_AC_t; + } ATTR_PACKED USB_Audio_StdDescriptor_Interface_AC_t; /** \brief Audio class-specific Feature Unit Descriptor (LUFA naming conventions). * @@ -453,7 +453,7 @@ uint8_t ChannelControls[3]; /**< Feature masks for the control channel, and each separate audio channel. */ uint8_t FeatureUnitStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_Audio_Descriptor_FeatureUnit_t; + } ATTR_PACKED USB_Audio_Descriptor_FeatureUnit_t; /** \brief Audio class-specific Feature Unit Descriptor (USB-IF naming conventions). * @@ -482,7 +482,7 @@ uint8_t bmaControls[3]; /**< Feature masks for the control channel, and each separate audio channel. */ uint8_t iFeature; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_Audio_StdDescriptor_FeatureUnit_t; + } ATTR_PACKED USB_Audio_StdDescriptor_FeatureUnit_t; /** \brief Audio class-specific Streaming Audio Interface Descriptor (LUFA naming conventions). * @@ -502,7 +502,7 @@ uint8_t FrameDelay; /**< Delay in frames resulting from the complete sample processing from input to output. */ uint16_t AudioFormat; /**< Format of the audio stream, see Audio Device Formats specification. */ - } USB_Audio_Descriptor_Interface_AS_t; + } ATTR_PACKED USB_Audio_Descriptor_Interface_AS_t; /** \brief Audio class-specific Streaming Audio Interface Descriptor (USB-IF naming conventions). * @@ -527,7 +527,7 @@ uint8_t bDelay; /**< Delay in frames resulting from the complete sample processing from input to output. */ uint16_t wFormatTag; /**< Format of the audio stream, see Audio Device Formats specification. */ - } USB_Audio_StdDescriptor_Interface_AS_t; + } ATTR_PACKED USB_Audio_StdDescriptor_Interface_AS_t; /** \brief 24-Bit Audio Frequency Structure. * @@ -539,7 +539,7 @@ uint8_t Byte1; /**< Lowest 8 bits of the 24-bit value. */ uint8_t Byte2; /**< Middle 8 bits of the 24-bit value. */ uint8_t Byte3; /**< Upper 8 bits of the 24-bit value. */ - } USB_Audio_SampleFreq_t; + } ATTR_PACKED USB_Audio_SampleFreq_t; /** \brief Audio class-specific Format Descriptor (LUFA naming conventions). * @@ -564,7 +564,7 @@ uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device. */ USB_Audio_SampleFreq_t SampleFrequencies[AUDIO_TOTAL_SAMPLE_RATES]; /**< Sample frequencies supported by the device (must be 24-bit). */ - } USB_Audio_Descriptor_Format_t; + } ATTR_PACKED USB_Audio_Descriptor_Format_t; /** \brief Audio class-specific Format Descriptor (USB-IF naming conventions). * @@ -594,7 +594,7 @@ uint8_t bSampleFrequencyType; /**< Total number of sample frequencies supported by the device. */ uint8_t SampleFrequencies[AUDIO_TOTAL_SAMPLE_RATES * 3]; /**< Sample frequencies supported by the device (must be 24-bit). */ - } USB_Audio_StdDescriptor_Format_t; + } ATTR_PACKED USB_Audio_StdDescriptor_Format_t; /** \brief Audio class-specific Streaming Endpoint Descriptor (LUFA naming conventions). * @@ -609,7 +609,7 @@ uint8_t Refresh; /**< Always set to zero for Audio class devices. */ uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronization information to, if needed (zero otherwise). */ - } USB_Audio_Descriptor_StreamEndpoint_Std_t; + } ATTR_PACKED USB_Audio_Descriptor_StreamEndpoint_Std_t; /** \brief Audio class-specific Streaming Endpoint Descriptor (USB-IF naming conventions). * @@ -640,7 +640,7 @@ uint8_t bRefresh; /**< Always set to zero for Audio class devices. */ uint8_t bSynchAddress; /**< Endpoint address to send synchronization information to, if needed (zero otherwise). */ - } USB_Audio_StdDescriptor_StreamEndpoint_Std_t; + } ATTR_PACKED USB_Audio_StdDescriptor_StreamEndpoint_Std_t; /** \brief Audio class-specific Extended Endpoint Descriptor (LUFA naming conventions). * @@ -661,7 +661,7 @@ uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification. */ uint16_t LockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry. */ - } USB_Audio_Descriptor_StreamEndpoint_Spc_t; + } ATTR_PACKED USB_Audio_Descriptor_StreamEndpoint_Spc_t; /** \brief Audio class-specific Extended Endpoint Descriptor (USB-IF naming conventions). * @@ -687,7 +687,7 @@ uint8_t bLockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification. */ uint16_t wLockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry. */ - } USB_Audio_StdDescriptor_StreamEndpoint_Spc_t; + } ATTR_PACKED USB_Audio_StdDescriptor_StreamEndpoint_Spc_t; /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h index cfaebb858..91686d86e 100644 --- a/LUFA/Drivers/USB/Class/Common/CDC.h +++ b/LUFA/Drivers/USB/Class/Common/CDC.h @@ -241,7 +241,7 @@ uint16_t CDCSpecification; /**< Version number of the CDC specification implemented by the device, * encoded in BCD format. */ - } USB_CDC_Descriptor_FunctionalHeader_t; + } ATTR_PACKED USB_CDC_Descriptor_FunctionalHeader_t; /** \brief CDC class-specific Functional Header Descriptor (USB-IF naming conventions). * @@ -262,7 +262,7 @@ * must be \ref CDC_DSUBTYPE_CSInterface_Header. */ uint16_t bcdCDC; /**< Version number of the CDC specification implemented by the device, encoded in BCD format. */ - } USB_CDC_StdDescriptor_FunctionalHeader_t; + } ATTR_PACKED USB_CDC_StdDescriptor_FunctionalHeader_t; /** \brief CDC class-specific Functional ACM Descriptor (LUFA naming conventions). * @@ -281,7 +281,7 @@ * this should be set to a fixed value of 0x06 - for other capabilities, refer * to the CDC ACM specification. */ - } USB_CDC_Descriptor_FunctionalACM_t; + } ATTR_PACKED USB_CDC_Descriptor_FunctionalACM_t; /** \brief CDC class-specific Functional ACM Descriptor (USB-IF naming conventions). * @@ -304,7 +304,7 @@ * this should be set to a fixed value of 0x06 - for other capabilities, refer * to the CDC ACM specification. */ - } USB_CDC_StdDescriptor_FunctionalACM_t; + } ATTR_PACKED USB_CDC_StdDescriptor_FunctionalACM_t; /** \brief CDC class-specific Functional Union Descriptor (LUFA naming conventions). * @@ -321,7 +321,7 @@ */ uint8_t MasterInterfaceNumber; /**< Interface number of the CDC Control interface. */ uint8_t SlaveInterfaceNumber; /**< Interface number of the CDC Data interface. */ - } USB_CDC_Descriptor_FunctionalUnion_t; + } ATTR_PACKED USB_CDC_Descriptor_FunctionalUnion_t; /** \brief CDC class-specific Functional Union Descriptor (USB-IF naming conventions). * @@ -342,7 +342,7 @@ */ uint8_t bMasterInterface; /**< Interface number of the CDC Control interface. */ uint8_t bSlaveInterface0; /**< Interface number of the CDC Data interface. */ - } USB_CDC_StdDescriptor_FunctionalUnion_t; + } ATTR_PACKED USB_CDC_StdDescriptor_FunctionalUnion_t; /** \brief CDC Virtual Serial Port Line Encoding Settings Structure. * @@ -359,7 +359,7 @@ * \ref CDC_LineEncodingParity_t enum. */ uint8_t DataBits; /**< Bits of data per character of the virtual serial port. */ - } CDC_LineEncoding_t; + } ATTR_PACKED CDC_LineEncoding_t; /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h index f9684ed25..968b2655e 100644 --- a/LUFA/Drivers/USB/Class/Common/HID.h +++ b/LUFA/Drivers/USB/Class/Common/HID.h @@ -581,7 +581,7 @@ uint8_t HIDReportType; /**< Type of HID report, set to \ref HID_DTYPE_Report. */ uint16_t HIDReportLength; /**< Length of the associated HID report descriptor, in bytes. */ - } USB_HID_Descriptor_HID_t; + } ATTR_PACKED USB_HID_Descriptor_HID_t; /** \brief HID class-specific HID Descriptor (USB-IF naming conventions). * @@ -605,7 +605,7 @@ uint8_t bDescriptorType2; /**< Type of HID report, set to \ref HID_DTYPE_Report. */ uint16_t wDescriptorLength; /**< Length of the associated HID report descriptor, in bytes. */ - } USB_HID_StdDescriptor_HID_t; + } ATTR_PACKED USB_HID_StdDescriptor_HID_t; /** \brief Standard HID Boot Protocol Mouse Report. * @@ -616,7 +616,7 @@ uint8_t Button; /**< Button mask for currently pressed buttons in the mouse. */ int8_t X; /**< Current delta X movement of the mouse. */ int8_t Y; /**< Current delta Y movement on the mouse. */ - } USB_MouseReport_Data_t; + } ATTR_PACKED USB_MouseReport_Data_t; /** \brief Standard HID Boot Protocol Keyboard Report. * @@ -629,7 +629,7 @@ */ uint8_t Reserved; /**< Reserved for OEM use, always set to 0. */ uint8_t KeyCode[6]; /**< Key codes of the currently pressed keys. */ - } USB_KeyboardReport_Data_t; + } ATTR_PACKED USB_KeyboardReport_Data_t; /** Type define for the data type used to store HID report descriptor elements. */ typedef uint8_t USB_Descriptor_HIDReport_Datatype_t; diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h index d2e884a97..2525ccfca 100644 --- a/LUFA/Drivers/USB/Class/Common/MIDI.h +++ b/LUFA/Drivers/USB/Class/Common/MIDI.h @@ -113,7 +113,7 @@ * specification version. */ uint16_t TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */ - } USB_MIDI_Descriptor_AudioInterface_AS_t; + } ATTR_PACKED USB_MIDI_Descriptor_AudioInterface_AS_t; /** \brief MIDI class-specific Streaming Interface Descriptor (USB-IF naming conventions). * @@ -135,7 +135,7 @@ uint16_t bcdMSC; /**< Binary coded decimal value, indicating the supported MIDI Class specification version. */ uint16_t wTotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */ - } USB_MIDI_StdDescriptor_AudioInterface_AS_t; + } ATTR_PACKED USB_MIDI_StdDescriptor_AudioInterface_AS_t; /** \brief MIDI class-specific Input Jack Descriptor (LUFA naming conventions). * @@ -153,7 +153,7 @@ uint8_t JackID; /**< ID value of this jack - must be a unique value within the device. */ uint8_t JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_MIDI_Descriptor_InputJack_t; + } ATTR_PACKED USB_MIDI_Descriptor_InputJack_t; /** \brief MIDI class-specific Input Jack Descriptor (USB-IF naming conventions). * @@ -176,7 +176,7 @@ uint8_t bJackID; /**< ID value of this jack - must be a unique value within the device. */ uint8_t iJack; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_MIDI_StdDescriptor_InputJack_t; + } ATTR_PACKED USB_MIDI_StdDescriptor_InputJack_t; /** \brief MIDI class-specific Output Jack Descriptor (LUFA naming conventions). * @@ -198,7 +198,7 @@ uint8_t SourcePinID[1]; /**< Pin number in the input jack of each output pin's source data. */ uint8_t JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_MIDI_Descriptor_OutputJack_t; + } ATTR_PACKED USB_MIDI_Descriptor_OutputJack_t; /** \brief MIDI class-specific Output Jack Descriptor (USB-IF naming conventions). * @@ -225,7 +225,7 @@ uint8_t baSourcePin[1]; /**< Pin number in the input jack of each output pin's source data. */ uint8_t iJack; /**< Index of a string descriptor describing this descriptor within the device. */ - } USB_MIDI_StdDescriptor_OutputJack_t; + } ATTR_PACKED USB_MIDI_StdDescriptor_OutputJack_t; /** \brief Audio class-specific Jack Endpoint Descriptor (LUFA naming conventions). * @@ -242,7 +242,7 @@ uint8_t TotalEmbeddedJacks; /**< Total number of jacks inside this endpoint. */ uint8_t AssociatedJackID[1]; /**< IDs of each jack inside the endpoint. */ - } USB_MIDI_Descriptor_Jack_Endpoint_t; + } ATTR_PACKED USB_MIDI_Descriptor_Jack_Endpoint_t; /** \brief Audio class-specific Jack Endpoint Descriptor (USB-IF naming conventions). * @@ -264,7 +264,7 @@ uint8_t bNumEmbMIDIJack; /**< Total number of jacks inside this endpoint. */ uint8_t bAssocJackID[1]; /**< IDs of each jack inside the endpoint. */ - } USB_MIDI_StdDescriptor_Jack_Endpoint_t; + } ATTR_PACKED USB_MIDI_StdDescriptor_Jack_Endpoint_t; /** \brief MIDI Class Driver Event Packet. * @@ -278,7 +278,7 @@ uint8_t Data1; /**< First byte of data in the MIDI event. */ uint8_t Data2; /**< Second byte of data in the MIDI event. */ uint8_t Data3; /**< Third byte of data in the MIDI event. */ - } MIDI_EventPacket_t; + } ATTR_PACKED MIDI_EventPacket_t; /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h index ae22f5312..d641c33a3 100644 --- a/LUFA/Drivers/USB/Class/Common/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h @@ -266,7 +266,7 @@ uint8_t LUN; /**< Logical Unit number this command is issued to. */ uint8_t SCSICommandLength; /**< Length of the issued SCSI command within the SCSI command data array. */ uint8_t SCSICommandData[16]; /**< Issued SCSI command in the Command Block. */ - } MS_CommandBlockWrapper_t; + } ATTR_PACKED MS_CommandBlockWrapper_t; /** \brief Mass Storage Class Command Status Wrapper. * @@ -278,7 +278,7 @@ uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper. */ uint32_t DataTransferResidue; /**< Number of bytes of data not processed in the SCSI command. */ uint8_t Status; /**< Status code of the issued command - a value from the \ref MS_CommandStatusCodes_t enum. */ - } MS_CommandStatusWrapper_t; + } ATTR_PACKED MS_CommandStatusWrapper_t; /** \brief Mass Storage Class SCSI Sense Structure * @@ -306,7 +306,7 @@ uint8_t AdditionalSenseQualifier; uint8_t FieldReplaceableUnitCode; uint8_t SenseKeySpecific[3]; - } SCSI_Request_Sense_Response_t; + } ATTR_PACKED SCSI_Request_Sense_Response_t; /** \brief Mass Storage Class SCSI Inquiry Structure. * @@ -347,7 +347,7 @@ uint8_t VendorID[8]; uint8_t ProductID[16]; uint8_t RevisionID[4]; - } SCSI_Inquiry_Response_t; + } ATTR_PACKED SCSI_Inquiry_Response_t; /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h index 64f080ae3..f98fc6d81 100644 --- a/LUFA/Drivers/USB/Class/Common/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h @@ -212,7 +212,7 @@ typedef struct { uint8_t Octets[6]; /**< Individual bytes of a MAC address */ - } MAC_Address_t; + } ATTR_PACKED MAC_Address_t; /** \brief RNDIS Ethernet Frame Packet Information Structure. * @@ -223,7 +223,7 @@ uint8_t FrameData[ETHERNET_FRAME_SIZE_MAX]; /**< Ethernet frame contents. */ uint16_t FrameLength; /**< Length in bytes of the Ethernet frame stored in the buffer. */ bool FrameInBuffer; /**< Indicates if a frame is currently stored in the buffer. */ - } Ethernet_Frame_Info_t; + } ATTR_PACKED Ethernet_Frame_Info_t; /** \brief RNDIS Common Message Header Structure. * @@ -233,7 +233,7 @@ { uint32_t MessageType; /**< RNDIS message type, a \c REMOTE_NDIS_*_MSG constant */ uint32_t MessageLength; /**< Total length of the RNDIS message, in bytes */ - } RNDIS_Message_Header_t; + } ATTR_PACKED RNDIS_Message_Header_t; /** \brief RNDIS Message Structure. * @@ -252,7 +252,7 @@ uint32_t PerPacketInfoLength; uint32_t VcHandle; uint32_t Reserved; - } RNDIS_Packet_Message_t; + } ATTR_PACKED RNDIS_Packet_Message_t; /** \brief RNDIS Initialization Message Structure. * @@ -267,7 +267,7 @@ uint32_t MajorVersion; uint32_t MinorVersion; uint32_t MaxTransferSize; - } RNDIS_Initialize_Message_t; + } ATTR_PACKED RNDIS_Initialize_Message_t; /** \brief RNDIS Initialize Complete Message Structure. * @@ -289,7 +289,7 @@ uint32_t PacketAlignmentFactor; uint32_t AFListOffset; uint32_t AFListSize; - } RNDIS_Initialize_Complete_t; + } ATTR_PACKED RNDIS_Initialize_Complete_t; /** \brief RNDIS Keep Alive Message Structure. * @@ -300,7 +300,7 @@ uint32_t MessageType; uint32_t MessageLength; uint32_t RequestId; - } RNDIS_KeepAlive_Message_t; + } ATTR_PACKED RNDIS_KeepAlive_Message_t; /** \brief RNDIS Keep Alive Complete Message Structure. * @@ -312,7 +312,7 @@ uint32_t MessageLength; uint32_t RequestId; uint32_t Status; - } RNDIS_KeepAlive_Complete_t; + } ATTR_PACKED RNDIS_KeepAlive_Complete_t; /** \brief RNDIS Reset Complete Message Structure. * @@ -325,7 +325,7 @@ uint32_t Status; uint32_t AddressingReset; - } RNDIS_Reset_Complete_t; + } ATTR_PACKED RNDIS_Reset_Complete_t; /** \brief RNDIS OID Property Set Message Structure. * @@ -341,7 +341,7 @@ uint32_t InformationBufferLength; uint32_t InformationBufferOffset; uint32_t DeviceVcHandle; - } RNDIS_Set_Message_t; + } ATTR_PACKED RNDIS_Set_Message_t; /** \brief RNDIS OID Property Set Complete Message Structure. * @@ -353,7 +353,7 @@ uint32_t MessageLength; uint32_t RequestId; uint32_t Status; - } RNDIS_Set_Complete_t; + } ATTR_PACKED RNDIS_Set_Complete_t; /** \brief RNDIS OID Property Query Message Structure. * @@ -369,7 +369,7 @@ uint32_t InformationBufferLength; uint32_t InformationBufferOffset; uint32_t DeviceVcHandle; - } RNDIS_Query_Message_t; + } ATTR_PACKED RNDIS_Query_Message_t; /** \brief RNDIS OID Property Query Complete Message Structure. * @@ -384,7 +384,7 @@ uint32_t InformationBufferLength; uint32_t InformationBufferOffset; - } RNDIS_Query_Complete_t; + } ATTR_PACKED RNDIS_Query_Complete_t; /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h index e440265b1..dd4865038 100644 --- a/LUFA/Drivers/USB/Class/Common/StillImage.h +++ b/LUFA/Drivers/USB/Class/Common/StillImage.h @@ -146,7 +146,7 @@ uint16_t Code; /**< Command, event or response code of the container. */ uint32_t TransactionID; /**< Unique container ID to link blocks together. */ uint32_t Params[3]; /**< Block parameters to be issued along with the block code (command blocks only). */ - } PIMA_Container_t; + } ATTR_PACKED PIMA_Container_t; /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) |