Add structure padding to the appropriate descriptor structures to maintain correct alignments on larger architectures.

Fix EVK1101 swapped joystick Right/Down masks.
pull/1469/head
Dean Camera 14 years ago
parent e4b3e3fc65
commit c8a438d66c

@ -81,10 +81,10 @@
#define JOY_UP (1UL << 7)
/** Mask for the joystick being pushed in the right direction. */
#define JOY_RIGHT (1UL << 8)
#define JOY_RIGHT (1UL << 9)
/** Mask for the joystick being pushed in the downward direction. */
#define JOY_DOWN (1UL << 9)
#define JOY_DOWN (1UL << 8)
/** Mask for the joystick being pushed inward. */
#define JOY_PRESS (1UL << 13)

@ -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)

@ -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)

@ -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;

@ -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)

@ -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)

@ -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)

@ -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)

@ -251,7 +251,7 @@
uint8_t Type; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
* given by the specific class.
*/
} USB_Descriptor_Header_t;
} ATTR_PACKED USB_Descriptor_Header_t;
/** \brief Standard USB Descriptor Header (USB-IF naming conventions).
*
@ -266,7 +266,7 @@
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
* given by the specific class.
*/
} USB_StdDescriptor_Header_t;
} ATTR_PACKED USB_StdDescriptor_Header_t;
/** \brief Standard USB Device Descriptor (LUFA naming conventions).
*
@ -315,7 +315,7 @@
uint8_t NumberOfConfigurations; /**< Total number of configurations supported by
* the device.
*/
} USB_Descriptor_Device_t;
} ATTR_PACKED USB_Descriptor_Device_t;
/** \brief Standard USB Device Descriptor (USB-IF naming conventions).
*
@ -363,7 +363,7 @@
uint8_t bNumConfigurations; /**< Total number of configurations supported by
* the device.
*/
} USB_StdDescriptor_Device_t;
} ATTR_PACKED USB_StdDescriptor_Device_t;
/** \brief Standard USB Configuration Descriptor (LUFA naming conventions).
*
@ -392,7 +392,7 @@
* current configuration, calculated by the \ref USB_CONFIG_POWER_MA()
* macro.
*/
} USB_Descriptor_Configuration_Header_t;
} ATTR_PACKED USB_Descriptor_Configuration_Header_t;
/** \brief Standard USB Configuration Descriptor (USB-IF naming conventions).
*
@ -420,7 +420,7 @@
* current configuration, calculated by the \ref USB_CONFIG_POWER_MA()
* macro.
*/
} USB_StdDescriptor_Configuration_Header_t;
} ATTR_PACKED USB_StdDescriptor_Configuration_Header_t;
/** \brief Standard USB Interface Descriptor (LUFA naming conventions).
*
@ -446,7 +446,7 @@
uint8_t Protocol; /**< Interface protocol ID. */
uint8_t InterfaceStrIndex; /**< Index of the string descriptor describing the interface. */
} USB_Descriptor_Interface_t;
} ATTR_PACKED USB_Descriptor_Interface_t;
/** \brief Standard USB Interface Descriptor (USB-IF naming conventions).
*
@ -474,7 +474,7 @@
uint8_t iInterface; /**< Index of the string descriptor describing the
* interface.
*/
} USB_StdDescriptor_Interface_t;
} ATTR_PACKED USB_StdDescriptor_Interface_t;
/** \brief Standard USB Interface Association Descriptor (LUFA naming conventions).
*
@ -503,7 +503,7 @@
uint8_t IADStrIndex; /**< Index of the string descriptor describing the
* interface association.
*/
} USB_Descriptor_Interface_Association_t;
} ATTR_PACKED USB_Descriptor_Interface_Association_t;
/** \brief Standard USB Interface Association Descriptor (USB-IF naming conventions).
*
@ -533,7 +533,7 @@
uint8_t iFunction; /**< Index of the string descriptor describing the
* interface association.
*/
} USB_StdDescriptor_Interface_Association_t;
} ATTR_PACKED USB_StdDescriptor_Interface_Association_t;
/** \brief Standard USB Endpoint Descriptor (LUFA naming conventions).
*
@ -558,7 +558,7 @@
uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpoint if it is an INTERRUPT
* or ISOCHRONOUS type.
*/
} USB_Descriptor_Endpoint_t;
} ATTR_PACKED USB_Descriptor_Endpoint_t;
/** \brief Standard USB Endpoint Descriptor (USB-IF naming conventions).
*
@ -586,7 +586,7 @@
uint8_t bInterval; /**< Polling interval in milliseconds for the endpoint if it is an INTERRUPT or
* ISOCHRONOUS type.
*/
} USB_StdDescriptor_Endpoint_t;
} ATTR_PACKED USB_StdDescriptor_Endpoint_t;
/** \brief Standard USB String Descriptor (LUFA naming conventions).
*
@ -616,7 +616,7 @@
* Unicode strings, and may be used instead of an explicit
* array of ASCII characters.
*/
} USB_Descriptor_String_t;
} ATTR_PACKED USB_Descriptor_String_t;
/** \brief Standard USB String Descriptor (USB-IF naming conventions).
*
@ -647,7 +647,7 @@
* quotation mark) are considered to be Unicode strings, and may be used instead
* of an explicit array of ASCII characters.
*/
} USB_StdDescriptor_String_t;
} ATTR_PACKED USB_StdDescriptor_String_t;
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)

@ -583,7 +583,7 @@
static inline uint32_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint32_t Endpoint_GetEndpointDirection(void)
{
return ((&AVR32_USBB.uecfg0)[USB_SelectedEndpoint] & AVR32_USBB_UECFG0_EPDIR_MASK);
return ((&AVR32_USBB.uecfg0)[USB_SelectedEndpoint] & AVR32_USBB_UECFG0_EPDIR_MASK) ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT;
}
/** Sets the direction of the currently selected endpoint.

@ -54,6 +54,7 @@
* - IR Remote to Keyboard decoder: http://netzhansa.blogspot.com/2010/04/our-living-room-hi-fi-setup-needs-mp3.html
* - LED Panel controller: http://projects.peterpolidoro.net/caltech/panelscontroller/panelscontroller.htm
* - Motherboard BIOS flasher: http://www.coreboot.org/InSystemFlasher
* - Nikon wireless camera remote control (Norwegian): http://hekta.org/~hpe1119/
* - PSGroove, a Playstation 3 Homebrew dongle: http://github.com/psgroove
* - Single LED Matrix Display: http://guysoft.wordpress.com/2009/10/08/bumble-b/
* - Linux Secure Storage Dongle: http://github.com/TomMD/teensy

Loading…
Cancel
Save