diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-07-11 09:50:54 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-07-11 09:50:54 +0000 |
| commit | 15efa067d3d03912bfe58b442b735e594acf9cf5 (patch) | |
| tree | 7a056c1f10c57743eb66aefc125e224b61660506 /LUFA/Drivers/USB/Class/Common | |
| parent | 1b5c5f8c35becac201439e6cb3dc549f5206601a (diff) | |
More endianness porting of the LUFA device mode class drivers.
Add endianness information to the class driver and core structure definitions.
Move out the unused Ethernet_Frame_Info_t structure definition to the RNDIS device demos where it is needed.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1858 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/Class/Common')
| -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 | 4 | ||||
| -rw-r--r-- | LUFA/Drivers/USB/Class/Common/MIDI.h | 18 | ||||
| -rw-r--r-- | LUFA/Drivers/USB/Class/Common/MassStorage.h | 7 | ||||
| -rw-r--r-- | LUFA/Drivers/USB/Class/Common/RNDIS.h | 33 | ||||
| -rw-r--r-- | LUFA/Drivers/USB/Class/Common/StillImage.h | 2 |
7 files changed, 100 insertions, 12 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h index 247f7f6d..32a66409 100644 --- a/LUFA/Drivers/USB/Class/Common/Audio.h +++ b/LUFA/Drivers/USB/Class/Common/Audio.h @@ -305,6 +305,8 @@ * a USB endpoint). See the USB Audio specification for more details. * * \see \ref USB_Audio_StdDescriptor_InputTerminal_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -333,6 +335,8 @@ * * \see \ref USB_Audio_Descriptor_InputTerminal_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -363,6 +367,8 @@ * a USB endpoint). See the USB Audio specification for more details. * * \see \ref USB_Audio_StdDescriptor_OutputTerminal_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -389,6 +395,8 @@ * * \see \ref USB_Audio_Descriptor_OutputTerminal_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -417,6 +425,8 @@ * details. * * \see \ref USB_Audio_StdDescriptor_Interface_AC_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -440,6 +450,8 @@ * * \see \ref USB_Audio_Descriptor_Interface_AC_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -466,6 +478,8 @@ * specification for more details. * * \see \ref USB_Audio_StdDescriptor_FeatureUnit_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -491,6 +505,8 @@ * * \see \ref USB_Audio_Descriptor_FeatureUnit_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -518,6 +534,8 @@ * how audio streams within the device are formatted. See the USB Audio specification for more details. * * \see \ref USB_Audio_StdDescriptor_Interface_AS_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -539,6 +557,8 @@ * * \see \ref USB_Audio_Descriptor_Interface_AS_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -567,6 +587,8 @@ * the continuous or discrete sample frequencies. * * \see \ref USB_Audio_StdDescriptor_Format_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -592,6 +614,8 @@ * * Type define for a 24bit audio sample frequency structure. As GCC does not contain a built in 24-bit datatype, * this this structure is used to build up the value instead. Fill this structure with the \ref AUDIO_SAMPLE_FREQ() macro. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -611,6 +635,8 @@ * * \see \ref USB_Audio_Descriptor_Format_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -642,6 +668,8 @@ * descriptor with a few Audio-class-specific extensions. See the USB Audio specification for more details. * * \see \ref USB_Audio_StdDescriptor_StreamEndpoint_Std_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -658,6 +686,8 @@ * * \see \ref USB_Audio_Descriptor_StreamEndpoint_Std_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -689,6 +719,8 @@ * class-specific extended endpoint descriptor. See the USB Audio specification for more details. * * \see \ref USB_Audio_StdDescriptor_StreamEndpoint_Spc_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -711,6 +743,8 @@ * * \see \ref USB_Audio_Descriptor_StreamEndpoint_Spc_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h index e74b0f1d..45e0c585 100644 --- a/LUFA/Drivers/USB/Class/Common/CDC.h +++ b/LUFA/Drivers/USB/Class/Common/CDC.h @@ -231,6 +231,8 @@ * See the CDC class specification for more details. * * \see \ref USB_CDC_StdDescriptor_FunctionalHeader_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -251,6 +253,8 @@ * * \see \ref USB_CDC_Descriptor_FunctionalHeader_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -270,6 +274,8 @@ * supports the CDC ACM subclass of the CDC specification. See the CDC class specification for more details. * * \see \ref USB_CDC_StdDescriptor_FunctionalACM_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -290,6 +296,8 @@ * * \see \ref USB_CDC_Descriptor_FunctionalACM_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -312,6 +320,8 @@ * CDC control and data interfaces are related. See the CDC class specification for more details. * * \see \ref USB_CDC_StdDescriptor_FunctionalUnion_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -330,6 +340,8 @@ * * \see \ref USB_CDC_Descriptor_FunctionalUnion_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -348,6 +360,8 @@ * * Type define for a CDC Line Encoding structure, used to hold the various encoding parameters for a virtual * serial port. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h index ce28d34e..4e3c701c 100644 --- a/LUFA/Drivers/USB/Class/Common/HID.h +++ b/LUFA/Drivers/USB/Class/Common/HID.h @@ -574,6 +574,8 @@ * specification for details on the structure elements. * * \see \ref USB_HID_StdDescriptor_HID_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -595,6 +597,8 @@ * * \see \ref USB_HID_Descriptor_HID_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h index 1d6eb703..a273589e 100644 --- a/LUFA/Drivers/USB/Class/Common/MIDI.h +++ b/LUFA/Drivers/USB/Class/Common/MIDI.h @@ -103,6 +103,8 @@ * See the USB Audio specification for more details. * * \see \ref USB_MIDI_StdDescriptor_AudioInterface_AS_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -123,6 +125,8 @@ * * \see \ref USB_MIDI_Descriptor_AudioInterface_AS_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -143,6 +147,8 @@ * a physical input jack, or a logical jack (receiving input data internally, or from the host via an endpoint). * * \see \ref USB_MIDI_StdDescriptor_InputJack_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -162,6 +168,8 @@ * * \see \ref USB_MIDI_Descriptor_InputJack_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -184,6 +192,8 @@ * a physical output jack, or a logical jack (sending output data internally, or to the host via an endpoint). * * \see \ref USB_MIDI_StdDescriptor_OutputJack_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -207,6 +217,8 @@ * * \see \ref USB_MIDI_Descriptor_OutputJack_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -234,6 +246,8 @@ * class-specific extended MIDI endpoint descriptor. See the USB Audio specification for more details. * * \see \ref USB_MIDI_StdDescriptor_Jack_Endpoint_t for the version of this type with standard element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -252,6 +266,8 @@ * * \see \ref USB_MIDI_Descriptor_Jack_Endpoint_t for the version of this type with non-standard LUFA specific * element names. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -269,6 +285,8 @@ /** \brief MIDI Class Driver Event Packet. * * Type define for a USB MIDI event packet, used to encapsulate sent and received MIDI messages from a USB MIDI interface. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h index 9f8de4e0..49246ba7 100644 --- a/LUFA/Drivers/USB/Class/Common/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h @@ -256,7 +256,10 @@ /* Type Defines: */ /** \brief Mass Storage Class Command Block Wrapper. * - * Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */ + * Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. + */ typedef struct { uint32_t Signature; /**< Command block signature, must be \ref MS_CBW_SIGNATURE to indicate a valid Command Block. */ @@ -271,6 +274,8 @@ /** \brief Mass Storage Class Command Status Wrapper. * * Type define for a Command Status Wrapper, used in the Mass Storage Bulk-Only Transport protocol. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h index 0ca50d5a..05ab13b7 100644 --- a/LUFA/Drivers/USB/Class/Common/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h @@ -208,17 +208,6 @@ }; /* Type Defines: */ - /** \brief Ethernet Frame Packet Information Structure. - * - * Type define for an Ethernet frame buffer data and information structure. This can be used to conveniently - * store both the size and data in an Ethernet frame. - */ - typedef struct - { - uint8_t FrameData[ETHERNET_FRAME_SIZE_MAX]; /**< Ethernet frame contents. */ - uint16_t FrameLength; /**< Length in bytes of the Ethernet frame stored in the buffer. */ - } Ethernet_Frame_Info_t; - /** \brief MAC Address Structure. * * Type define for a physical MAC address of a device on a network. @@ -231,6 +220,8 @@ /** \brief RNDIS Common Message Header Structure. * * Type define for a RNDIS message header, sent before RNDIS messages. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -241,6 +232,8 @@ /** \brief RNDIS Message Structure. * * Type define for a RNDIS packet message, used to encapsulate Ethernet packets sent to and from the adapter. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -260,6 +253,8 @@ /** \brief RNDIS Initialization Message Structure. * * Type define for a RNDIS Initialize command message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -275,6 +270,8 @@ /** \brief RNDIS Initialize Complete Message Structure. * * Type define for a RNDIS Initialize Complete response message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -297,6 +294,8 @@ /** \brief RNDIS Keep Alive Message Structure. * * Type define for a RNDIS Keep Alive command message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -308,6 +307,8 @@ /** \brief RNDIS Keep Alive Complete Message Structure. * * Type define for a RNDIS Keep Alive Complete response message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -320,6 +321,8 @@ /** \brief RNDIS Reset Complete Message Structure. * * Type define for a RNDIS Reset Complete response message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -333,6 +336,8 @@ /** \brief RNDIS OID Property Set Message Structure. * * Type define for a RNDIS OID Property Set command message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -349,6 +354,8 @@ /** \brief RNDIS OID Property Set Complete Message Structure. * * Type define for a RNDIS OID Property Set Complete response message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -361,6 +368,8 @@ /** \brief RNDIS OID Property Query Message Structure. * * Type define for a RNDIS OID Property Query command message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { @@ -377,6 +386,8 @@ /** \brief RNDIS OID Property Query Complete Message Structure. * * Type define for a RNDIS OID Property Query Complete response message. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h index dd486503..4f418ad9 100644 --- a/LUFA/Drivers/USB/Class/Common/StillImage.h +++ b/LUFA/Drivers/USB/Class/Common/StillImage.h @@ -138,6 +138,8 @@ * * Type define for a PIMA container, use to send commands and receive responses to and from an * attached Still Image device. + * + * \note Regardless of CPU architecture, these values should be stored as little endian. */ typedef struct { |
