Clean up excessive whitespace at the end of each line using the wspurify tool made by Laszlo Monda
This commit is contained in:
parent
a8871c7fba
commit
5a4def7478
760 changed files with 12883 additions and 12164 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
/* Includes: */
|
||||
#include "../../USB.h"
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Enable C linkage for C++ Compilers: */
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
*/
|
||||
#define AUDIO_TOTAL_SAMPLE_RATES 1
|
||||
#endif
|
||||
|
||||
|
||||
/** Supported channel mask for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_CHANNEL_LEFT_FRONT (1 << 0)
|
||||
|
||||
|
|
@ -139,58 +139,58 @@
|
|||
/** Supported feature mask for an Audio class feature unit descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_FEATURE_BASS_LOUDNESS (1 << 9)
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_UNDEFINED 0x0100
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_STREAMING 0x0101
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_VENDOR 0x01FF
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_UNDEFINED 0x0200
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_MIC 0x0201
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_DESKTOP_MIC 0x0202
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_PERSONAL_MIC 0x0203
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_OMNIDIR_MIC 0x0204
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_MIC_ARRAY 0x0205
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_PROCESSING_MIC 0x0206
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_IN_OUT_UNDEFINED 0x0300
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_SPEAKER 0x0301
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_HEADPHONES 0x0302
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_HEAD_MOUNTED 0x0303
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_DESKTOP 0x0304
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_ROOM 0x0305
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_COMMUNICATION 0x0306
|
||||
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
|
||||
#define AUDIO_TERMINAL_OUT_LOWFREQ 0x0307
|
||||
|
||||
/** Convenience macro to fill a 24-bit \ref USB_Audio_SampleFreq_t structure with the given sample rate as a 24-bit number.
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
* \param[in] freq Required audio sampling frequency in HZ
|
||||
*/
|
||||
#define AUDIO_SAMPLE_FREQ(freq) {((uint32_t)freq & 0x00FFFF), (((uint32_t)freq >> 16) & 0x0000FF)}
|
||||
|
||||
|
||||
/** Mask for the attributes parameter of an Audio class-specific Endpoint descriptor, indicating that the endpoint
|
||||
* accepts only filled endpoint packets of audio samples.
|
||||
*/
|
||||
|
|
@ -208,7 +208,7 @@
|
|||
* will accept partially filled endpoint packets of audio samples.
|
||||
*/
|
||||
#define AUDIO_EP_ACCEPTS_SMALL_PACKETS (0 << 7)
|
||||
|
||||
|
||||
/* Enums: */
|
||||
/** Audio class specific interface description subtypes, for the Audio Control interface. */
|
||||
enum Audio_CSInterface_AC_SubTypes_t
|
||||
|
|
@ -236,7 +236,7 @@
|
|||
{
|
||||
AUDIO_DSUBTYPE_CSEndpoint_General = 0x01, /**< Audio class specific endpoint general descriptor. */
|
||||
};
|
||||
|
||||
|
||||
/* Type Defines: */
|
||||
/** \brief Audio class-specific Input Terminal Descriptor (LUFA naming conventions).
|
||||
*
|
||||
|
|
@ -252,7 +252,7 @@
|
|||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* must be \ref AUDIO_DSUBTYPE_CSInterface_InputTerminal.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t TerminalID; /**< ID value of this terminal unit - must be a unique value within the device. */
|
||||
uint16_t TerminalType; /**< Type of terminal, a TERMINAL_* mask. */
|
||||
uint8_t AssociatedOutputTerminal; /**< ID of associated output terminal, for physically grouped terminals
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
*/
|
||||
uint8_t TotalChannels; /**< Total number of separate audio channels within this interface (right, left, etc.) */
|
||||
uint16_t ChannelConfig; /**< CHANNEL_* masks indicating what channel layout is supported by this terminal. */
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -291,7 +291,7 @@
|
|||
*/
|
||||
uint8_t bNrChannels; /**< Total number of separate audio channels within this interface (right, left, etc.) */
|
||||
uint16_t wChannelConfig; /**< CHANNEL_* masks indicating what channel layout is supported by this terminal. */
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -310,14 +310,14 @@
|
|||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* must be \ref AUDIO_DSUBTYPE_CSInterface_OutputTerminal.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t TerminalID; /**< ID value of this terminal unit - must be a unique value within the device. */
|
||||
uint16_t TerminalType; /**< Type of terminal, a TERMINAL_* mask. */
|
||||
uint8_t AssociatedInputTerminal; /**< ID of associated input terminal, for physically grouped terminals
|
||||
* such as the speaker and microphone of a phone handset.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
|
@ -346,7 +346,7 @@
|
|||
* such as the speaker and microphone of a phone handset.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
|
@ -367,7 +367,7 @@
|
|||
|
||||
uint16_t ACSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version. */
|
||||
uint16_t TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -394,11 +394,11 @@
|
|||
|
||||
uint16_t bcdADC; /**< Binary coded decimal value, indicating the supported Audio Class specification version. */
|
||||
uint16_t wTotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/** \brief Audio class-specific Feature Unit Descriptor (LUFA naming conventions).
|
||||
*
|
||||
* Type define for an Audio class-specific Feature Unit descriptor. This indicates to the host what features
|
||||
|
|
@ -413,13 +413,13 @@
|
|||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* must be \ref AUDIO_DSUBTYPE_CSInterface_Feature.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t UnitID; /**< ID value of this feature unit - must be a unique value within the device. */
|
||||
uint8_t SourceID; /**< Source ID value of the audio source input into this feature unit. */
|
||||
|
||||
|
||||
uint8_t ControlSize; /**< Size of each element in the ChanelControlls array. */
|
||||
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;
|
||||
|
||||
|
|
@ -442,16 +442,16 @@
|
|||
uint8_t bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* must be \ref AUDIO_DSUBTYPE_CSInterface_Feature.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t bUnitID; /**< ID value of this feature unit - must be a unique value within the device. */
|
||||
uint8_t bSourceID; /**< Source ID value of the audio source input into this feature unit. */
|
||||
|
||||
|
||||
uint8_t bControlSize; /**< Size of each element in the ChanelControlls array. */
|
||||
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;
|
||||
|
||||
|
||||
/** \brief Audio class-specific Streaming Audio Interface Descriptor (LUFA naming conventions).
|
||||
*
|
||||
* Type define for an Audio class-specific streaming interface descriptor. This indicates to the host
|
||||
|
|
@ -465,9 +465,9 @@
|
|||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* a value from the \ref Audio_CSInterface_AS_SubTypes_t enum.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t TerminalLink; /**< ID value of the output terminal this descriptor is describing. */
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -490,13 +490,13 @@
|
|||
uint8_t bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* a value from the \ref Audio_CSInterface_AS_SubTypes_t enum.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t bTerminalLink; /**< ID value of the output terminal this descriptor is describing. */
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/** \brief 24-Bit Audio Frequency Structure.
|
||||
*
|
||||
* Type define for a 24bit audio sample frequency structure. GCC does not contain a built in 24bit datatype,
|
||||
|
|
@ -522,14 +522,14 @@
|
|||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* must be \ref AUDIO_DSUBTYPE_CSInterface_FormatType.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t FormatType; /**< Format of the audio stream, see Audio Device Formats specification. */
|
||||
uint8_t Channels; /**< Total number of discrete channels in the stream. */
|
||||
|
||||
|
||||
uint8_t SubFrameSize; /**< Size in bytes of each channel's sample data in the stream. */
|
||||
uint8_t BitResolution; /**< Bits of resolution of each channel's samples in the stream. */
|
||||
|
||||
uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device. */
|
||||
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;
|
||||
|
||||
|
|
@ -555,17 +555,17 @@
|
|||
|
||||
uint8_t bFormatType; /**< Format of the audio stream, see Audio Device Formats specification. */
|
||||
uint8_t bNrChannels; /**< Total number of discrete channels in the stream. */
|
||||
|
||||
|
||||
uint8_t bSubFrameSize; /**< Size in bytes of each channel's sample data in the stream. */
|
||||
uint8_t bBitResolution; /**< Bits of resolution of each channel's samples in the stream. */
|
||||
|
||||
uint8_t bSampleFrequencyType; /**< Total number of sample frequencies supported by the device. */
|
||||
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;
|
||||
|
||||
|
||||
/** \brief Audio class-specific Streaming Endpoint Descriptor (LUFA naming conventions).
|
||||
*
|
||||
* Type define for an Audio class-specific endpoint descriptor. This contains a regular endpoint
|
||||
* Type define for an Audio class-specific endpoint descriptor. This contains a regular endpoint
|
||||
* 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.
|
||||
|
|
@ -580,7 +580,7 @@
|
|||
|
||||
/** \brief Audio class-specific Streaming Endpoint Descriptor (USB-IF naming conventions).
|
||||
*
|
||||
* Type define for an Audio class-specific endpoint descriptor. This contains a regular endpoint
|
||||
* Type define for an Audio class-specific endpoint descriptor. This contains a regular endpoint
|
||||
* descriptor with a few Audio-class-specific extensions. See the USB Audio specification for more details.
|
||||
*
|
||||
* \see \ref USB_Audio_Descriptor_StreamEndpoint_Std_t for the version of this type with non-standard LUFA specific
|
||||
|
|
@ -592,10 +592,10 @@
|
|||
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a
|
||||
* value given by the specific class.
|
||||
*/
|
||||
uint8_t bEndpointAddress; /**< Logical address of the endpoint within the device for the current
|
||||
uint8_t bEndpointAddress; /**< Logical address of the endpoint within the device for the current
|
||||
* configuration, including direction mask.
|
||||
*/
|
||||
uint8_t bmAttributes; /**< Endpoint attributes, comprised of a mask of the endpoint type (EP_TYPE_*)
|
||||
uint8_t bmAttributes; /**< Endpoint attributes, comprised of a mask of the endpoint type (EP_TYPE_*)
|
||||
* and attributes (ENDPOINT_ATTR_*) masks.
|
||||
*/
|
||||
uint16_t wMaxPacketSize; /**< Size of the endpoint bank, in bytes. This indicates the maximum packet size
|
||||
|
|
@ -604,7 +604,7 @@
|
|||
uint8_t bInterval; /**< Polling interval in milliseconds for the endpoint if it is an INTERRUPT or
|
||||
* ISOCHRONOUS type.
|
||||
*/
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -623,7 +623,7 @@
|
|||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* a value from the \ref Audio_CSEndpoint_SubTypes_t enum.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t Attributes; /**< Audio class-specific endpoint attributes, such as ACCEPTS_SMALL_PACKETS. */
|
||||
|
||||
uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification. */
|
||||
|
|
@ -649,18 +649,19 @@
|
|||
uint8_t bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors,
|
||||
* a value from the \ref Audio_CSEndpoint_SubTypes_t enum.
|
||||
*/
|
||||
|
||||
|
||||
uint8_t bmAttributes; /**< Audio class-specific endpoint attributes, such as ACCEPTS_SMALL_PACKETS. */
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/* Disable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CDC_CLASS_COMMON_H_
|
||||
#define _CDC_CLASS_COMMON_H_
|
||||
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
#if !defined(__INCLUDE_FROM_CDC_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/CDC.h instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros: */
|
||||
/** Mask for the DTR handshake line for use with the \ref CDC_REQ_SetControlLineState class-specific request
|
||||
* from the host, to indicate that the DTR line state should be high.
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
* from the host, to indicate that the RTS line state should be high.
|
||||
*/
|
||||
#define CDC_CONTROL_LINE_OUT_RTS (1 << 1)
|
||||
|
||||
|
||||
/** Mask for the DCD handshake line for use with the \ref CDC_NOTIF_SerialState class-specific notification
|
||||
* from the device to the host, to indicate that the DCD line state is currently high.
|
||||
*/
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
* to indicate that a data overrun error has occurred on the virtual serial port.
|
||||
*/
|
||||
#define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
|
||||
|
||||
|
||||
/** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a
|
||||
* uniform structure but variable sized data payloads, thus cannot be represented accurately by
|
||||
* a single typedef struct. A macro is used instead so that functional descriptors can be created
|
||||
|
|
@ -125,19 +125,19 @@
|
|||
uint8_t SubType; \
|
||||
uint8_t Data[DataSize]; \
|
||||
}
|
||||
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the CDC class specific control requests that can be issued by the USB bus host. */
|
||||
enum CDC_ClassRequests_t
|
||||
{
|
||||
{
|
||||
CDC_REQ_SendEncapsulatedCommand = 0x00, /**< CDC class-specific request to send an encapsulated command to the device. */
|
||||
CDC_REQ_GetEncapsulatedResponse = 0x01, /**< CDC class-specific request to retrieve an encapsulated command response from the device. */
|
||||
CDC_REQ_GetEncapsulatedResponse = 0x01, /**< CDC class-specific request to retrieve an encapsulated command response from the device. */
|
||||
CDC_REQ_SetLineEncoding = 0x20, /**< CDC class-specific request to set the current virtual serial port configuration settings. */
|
||||
CDC_REQ_GetLineEncoding = 0x21, /**< CDC class-specific request to get the current virtual serial port configuration settings. */
|
||||
CDC_REQ_SetControlLineState = 0x22, /**< CDC class-specific request to set the current virtual serial port handshake line states. */
|
||||
CDC_REQ_SendBreak = 0x23, /**< CDC class-specific request to send a break to the receiver via the carrier channel. */
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the CDC class specific notification requests that can be issued by a CDC device to a host. */
|
||||
enum CDC_ClassNotifications_t
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
* endpoint.
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the CDC class specific interface descriptor subtypes. */
|
||||
enum CDC_DescriptorSubtypes_t
|
||||
{
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
CDC_DSUBTYPE_CSInterface_Ethernet = 0x0F, /**< CDC class-specific Ethernet functional descriptor. */
|
||||
CDC_DSUBTYPE_CSInterface_ATM = 0x10, /**< CDC class-specific Asynchronous Transfer Mode functional descriptor. */
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the possible line encoding formats of a virtual serial port. */
|
||||
enum CDC_LineEncodingFormats_t
|
||||
{
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
CDC_LINEENCODING_OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits. */
|
||||
CDC_LINEENCODING_TwoStopBits = 2, /**< Each frame contains two stop bits. */
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the possible line encoding parity settings of a virtual serial port. */
|
||||
enum CDC_LineEncodingParity_t
|
||||
{
|
||||
|
|
@ -270,7 +270,7 @@
|
|||
* to the CDC ACM specification.
|
||||
*/
|
||||
} USB_CDC_StdDescriptor_FunctionalACM_t;
|
||||
|
||||
|
||||
/** \brief CDC class-specific Functional Union Descriptor (LUFA naming conventions).
|
||||
*
|
||||
* Type define for a CDC class-specific functional Union descriptor. This indicates to the host that specific
|
||||
|
|
@ -287,7 +287,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;
|
||||
|
||||
|
||||
/** \brief CDC class-specific Functional Union Descriptor (USB-IF naming conventions).
|
||||
*
|
||||
* Type define for a CDC class-specific functional Union descriptor. This indicates to the host that specific
|
||||
|
|
@ -313,7 +313,8 @@
|
|||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _HID_CLASS_COMMON_H_
|
||||
#define _HID_CLASS_COMMON_H_
|
||||
|
||||
|
|
@ -59,8 +59,8 @@
|
|||
#if !defined(__INCLUDE_FROM_HID_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/HID.h instead.
|
||||
#endif
|
||||
|
||||
/* Macros: */
|
||||
|
||||
/* Macros: */
|
||||
/** Constant for a keyboard report modifier byte, indicating that the keyboard's left control key is currently pressed. */
|
||||
#define HID_KEYBOARD_MODIFER_LEFTCTRL (1 << 0)
|
||||
|
||||
|
|
@ -84,10 +84,10 @@
|
|||
|
||||
/** Constant for a keyboard report modifier byte, indicating that the keyboard's right GUI key is currently pressed. */
|
||||
#define HID_KEYBOARD_MODIFER_RIGHTGUI (1 << 7)
|
||||
|
||||
|
||||
/** Constant for a keyboard output report LED byte, indicating that the host's NUM LOCK mode is currently set. */
|
||||
#define HID_KEYBOARD_LED_NUMLOCK (1 << 0)
|
||||
|
||||
|
||||
/** Constant for a keyboard output report LED byte, indicating that the host's CAPS LOCK mode is currently set. */
|
||||
#define HID_KEYBOARD_LED_CAPSLOCK (1 << 1)
|
||||
|
||||
|
|
@ -108,14 +108,14 @@
|
|||
HID_REQ_GetProtocol = 0x03, /**< HID class-specific Request to get the current HID report protocol mode. */
|
||||
HID_REQ_SetProtocol = 0x0B, /**< HID class-specific Request to set the current HID report protocol mode. */
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the HID class specific descriptor types. */
|
||||
enum HID_DescriptorTypes_t
|
||||
{
|
||||
HID_DTYPE_HID = 0x21, /**< Descriptor header type value, to indicate a HID class HID descriptor. */
|
||||
HID_DTYPE_Report = 0x22, /**< Descriptor header type value, to indicate a HID class HID report descriptor. */
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the HID class boot protocols that may be supported by HID devices. */
|
||||
enum HID_BootProtocols_t
|
||||
{
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
* Specification).
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the different types of HID reports. */
|
||||
enum HID_ReportItemTypes_t
|
||||
{
|
||||
|
|
@ -151,10 +151,10 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */
|
||||
|
||||
|
||||
uint16_t HIDSpec; /**< BCD encoded version that the HID descriptor and device complies to. */
|
||||
uint8_t CountryCode; /**< Country code of the localized device, or zero if universal. */
|
||||
|
||||
|
||||
uint8_t TotalReportDescriptors; /**< Total number of HID report descriptors for the interface. */
|
||||
|
||||
uint8_t HIDReportType; /**< Type of HID report, set to \ref HID_DTYPE_Report. */
|
||||
|
|
@ -175,10 +175,10 @@
|
|||
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
|
||||
* given by the specific class.
|
||||
*/
|
||||
|
||||
|
||||
uint16_t bcdHID; /**< BCD encoded version that the HID descriptor and device complies to. */
|
||||
uint8_t bCountryCode; /**< Country code of the localized device, or zero if universal. */
|
||||
|
||||
|
||||
uint8_t bNumDescriptors; /**< Total number of HID report descriptors for the interface. */
|
||||
|
||||
uint8_t bDescriptorType2; /**< Type of HID report, set to \ref HID_DTYPE_Report. */
|
||||
|
|
@ -195,7 +195,7 @@
|
|||
int8_t X; /**< Current delta X movement of the mouse. */
|
||||
int8_t Y; /**< Current delta Y movement on the mouse. */
|
||||
} USB_MouseReport_Data_t;
|
||||
|
||||
|
||||
/** \brief Standard HID Boot Protocol Keyboard Report.
|
||||
*
|
||||
* Type define for a standard Boot Protocol Keyboard report
|
||||
|
|
@ -215,3 +215,4 @@
|
|||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
#if !defined(__INCLUDE_FROM_MIDI_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/MIDI.h instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros: */
|
||||
/** MIDI command for a note on (activation) event. */
|
||||
#define MIDI_COMMAND_NOTE_ON 0x90
|
||||
|
|
@ -78,21 +78,21 @@
|
|||
|
||||
/** Standard key press velocity value used for all note events. */
|
||||
#define MIDI_STANDARD_VELOCITY 64
|
||||
|
||||
|
||||
/** Convenience macro. MIDI channels are numbered from 1-10 (natural numbers) however the logical channel
|
||||
* addresses are zero-indexed. This converts a natural MIDI channel number into the logical channel address.
|
||||
*
|
||||
* \param[in] channel MIDI channel number to address.
|
||||
*/
|
||||
#define MIDI_CHANNEL(channel) ((channel) - 1)
|
||||
|
||||
|
||||
/* Enums: */
|
||||
enum MIDI_JackTypes_t
|
||||
{
|
||||
MIDI_JACKTYPE_Embedded = 0x01, /**< MIDI class descriptor jack type value for an embedded (logical) MIDI input or output jack. */
|
||||
MIDI_JACKTYPE_External = 0x02, /**< MIDI class descriptor jack type value for an external (physical) MIDI input or output jack. */
|
||||
};
|
||||
|
||||
|
||||
/* Type Defines: */
|
||||
/** \brief MIDI class-specific Streaming Interface Descriptor (LUFA naming conventions).
|
||||
*
|
||||
|
|
@ -106,13 +106,13 @@
|
|||
{
|
||||
USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */
|
||||
uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
|
||||
|
||||
|
||||
uint16_t AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class
|
||||
* specification version.
|
||||
*/
|
||||
uint16_t TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */
|
||||
} USB_MIDI_Descriptor_AudioInterface_AS_t;
|
||||
|
||||
|
||||
/** \brief MIDI class-specific Streaming Interface Descriptor (USB-IF naming conventions).
|
||||
*
|
||||
* Type define for an Audio class-specific MIDI streaming interface descriptor. This indicates to the host
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
*/
|
||||
|
||||
uint8_t bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
|
||||
uint8_t JackType; /**< Type of jack, one of the JACKTYPE_* mask values. */
|
||||
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;
|
||||
|
||||
|
|
@ -172,7 +172,7 @@
|
|||
|
||||
uint8_t bJackType; /**< Type of jack, one of the JACKTYPE_* mask values. */
|
||||
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;
|
||||
|
||||
|
|
@ -190,14 +190,14 @@
|
|||
|
||||
uint8_t JackType; /**< Type of jack, one of the JACKTYPE_* mask values. */
|
||||
uint8_t JackID; /**< ID value of this jack - must be a unique value within the device. */
|
||||
|
||||
|
||||
uint8_t NumberOfPins; /**< Number of output channels within the jack, either physical or logical. */
|
||||
uint8_t SourceJackID[1]; /**< ID of each output pin's source data jack. */
|
||||
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;
|
||||
|
||||
|
||||
/** \brief MIDI class-specific Output Jack Descriptor (USB-IF naming conventions).
|
||||
*
|
||||
* Type define for an Audio class-specific MIDI OUT jack. This gives information to the host on a MIDI output, either
|
||||
|
|
@ -217,11 +217,11 @@
|
|||
|
||||
uint8_t bJackType; /**< Type of jack, one of the JACKTYPE_* mask values. */
|
||||
uint8_t bJackID; /**< ID value of this jack - must be a unique value within the device. */
|
||||
|
||||
|
||||
uint8_t bNrInputPins; /**< Number of output channels within the jack, either physical or logical. */
|
||||
uint8_t baSourceID[1]; /**< ID of each output pin's source data jack. */
|
||||
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;
|
||||
|
||||
|
|
@ -272,17 +272,18 @@
|
|||
{
|
||||
unsigned char Command : 4; /**< Upper nibble of the MIDI command being sent or received in the event packet. */
|
||||
unsigned char CableNumber : 4; /**< Virtual cable number of the event being sent or received in the given MIDI interface. */
|
||||
|
||||
|
||||
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. */
|
||||
uint8_t Data3; /**< Third byte of data in the MIDI event. */
|
||||
} MIDI_EventPacket_t;
|
||||
|
||||
/* Disable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -64,14 +64,14 @@
|
|||
#if !defined(__INCLUDE_FROM_MS_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/MassStorage.h instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros: */
|
||||
/** Magic signature for a Command Block Wrapper used in the Mass Storage Bulk-Only transport protocol. */
|
||||
#define MS_CBW_SIGNATURE 0x43425355UL
|
||||
|
||||
/** Magic signature for a Command Status Wrapper used in the Mass Storage Bulk-Only transport protocol. */
|
||||
#define MS_CSW_SIGNATURE 0x53425355UL
|
||||
|
||||
|
||||
/** Mask for a Command Block Wrapper's flags attribute to specify a command with data sent from host-to-device. */
|
||||
#define MS_COMMAND_DIR_DATA_OUT (0 << 7)
|
||||
|
||||
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
/** SCSI Additional Sense Qualifier Code to indicate that an operation is currently in progress. */
|
||||
#define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
|
||||
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the Mass Storage class specific control requests that can be issued by the USB bus host. */
|
||||
enum MS_ClassRequests_t
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
* ready for the next command.
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the possible command status wrapper return status codes. */
|
||||
enum MS_CommandStatusCodes_t
|
||||
{
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
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;
|
||||
|
||||
|
||||
/** \brief Mass Storage Class Command Status Wrapper.
|
||||
*
|
||||
* Type define for a Command Status Wrapper, used in the Mass Storage Bulk-Only Transport protocol.
|
||||
|
|
@ -252,9 +252,9 @@
|
|||
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;
|
||||
|
||||
|
||||
/** \brief Mass Storage Class SCSI Sense Structure
|
||||
*
|
||||
*
|
||||
* Type define for a SCSI Sense structure. Structures of this type are filled out by the
|
||||
* device via the \ref MS_Host_RequestSense() function, indicating the current sense data of the
|
||||
* device (giving explicit error codes for the last issued command). For details of the
|
||||
|
|
@ -265,13 +265,13 @@
|
|||
uint8_t ResponseCode;
|
||||
|
||||
uint8_t SegmentNumber;
|
||||
|
||||
|
||||
unsigned char SenseKey : 4;
|
||||
unsigned char Reserved : 1;
|
||||
unsigned char ILI : 1;
|
||||
unsigned char EOM : 1;
|
||||
unsigned char FileMark : 1;
|
||||
|
||||
|
||||
uint8_t Information[4];
|
||||
uint8_t AdditionalLength;
|
||||
uint8_t CmdSpecificInformation[4];
|
||||
|
|
@ -293,12 +293,12 @@
|
|||
{
|
||||
unsigned char DeviceType : 5;
|
||||
unsigned char PeripheralQualifier : 3;
|
||||
|
||||
|
||||
unsigned char Reserved : 7;
|
||||
unsigned char Removable : 1;
|
||||
|
||||
|
||||
uint8_t Version;
|
||||
|
||||
|
||||
unsigned char ResponseDataFormat : 4;
|
||||
unsigned char Reserved2 : 1;
|
||||
unsigned char NormACA : 1;
|
||||
|
|
@ -316,17 +316,18 @@
|
|||
unsigned char WideBus16Bit : 1;
|
||||
unsigned char WideBus32Bit : 1;
|
||||
unsigned char RelAddr : 1;
|
||||
|
||||
|
||||
uint8_t VendorID[8];
|
||||
uint8_t ProductID[16];
|
||||
uint8_t RevisionID[4];
|
||||
} SCSI_Inquiry_Response_t;
|
||||
|
||||
|
||||
/* Disable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
#if !defined(__INCLUDE_FROM_PRINTER_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/Printer.h instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros: */
|
||||
/** Port status mask for a printer device, indicating that an error has *not* occurred. */
|
||||
#define PRNT_PORTSTATUS_NOTERROR (1 << 3)
|
||||
|
|
@ -74,12 +74,13 @@
|
|||
|
||||
/** Port status mask for a printer device, indicating that the device is currently out of paper. */
|
||||
#define PRNT_PORTSTATUS_PAPEREMPTY (1 << 5)
|
||||
|
||||
|
||||
/* Disable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
#include "../../USB.h"
|
||||
#include "RNDISConstants.h"
|
||||
#include "CDC.h"
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* Enable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
|
@ -69,20 +69,20 @@
|
|||
#if !defined(__INCLUDE_FROM_RNDIS_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/RNDIS.h instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros: */
|
||||
/** Implemented RNDIS Version Major. */
|
||||
#define REMOTE_NDIS_VERSION_MAJOR 0x01
|
||||
|
||||
/** Implemented RNDIS Version Minor. */
|
||||
#define REMOTE_NDIS_VERSION_MINOR 0x00
|
||||
|
||||
|
||||
/** Maximum size in bytes of a RNDIS control message which can be sent or received. */
|
||||
#define RNDIS_MESSAGE_BUFFER_SIZE 128
|
||||
|
||||
/** Maximum size in bytes of an Ethernet frame according to the Ethernet standard. */
|
||||
#define ETHERNET_FRAME_SIZE_MAX 1500
|
||||
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the RNDIS class specific control requests that can be issued by the USB bus host. */
|
||||
enum RNDIS_ClassRequests_t
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
RNDIS_REQ_SendEncapsulatedCommand = 0x00, /**< RNDIS request to issue a host-to-device NDIS command. */
|
||||
RNDIS_REQ_GetEncapsulatedResponse = 0x01, /**< RNDIS request to issue a device-to-host NDIS response. */
|
||||
};
|
||||
|
||||
|
||||
/** Enum for the possible NDIS adapter states. */
|
||||
enum RNDIS_States_t
|
||||
{
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
NDIS_HardwareStatus_Closing, /**< Hardware currently closing. */
|
||||
NDIS_HardwareStatus_NotReady /**< Hardware not ready to accept commands from the host. */
|
||||
};
|
||||
|
||||
|
||||
/* Type Defines: */
|
||||
/** \brief MAC Address Structure.
|
||||
*
|
||||
|
|
@ -174,12 +174,12 @@
|
|||
uint32_t MessageType;
|
||||
uint32_t MessageLength;
|
||||
uint32_t RequestId;
|
||||
|
||||
|
||||
uint32_t MajorVersion;
|
||||
uint32_t MinorVersion;
|
||||
uint32_t MaxTransferSize;
|
||||
} RNDIS_Initialize_Message_t;
|
||||
|
||||
|
||||
/** \brief RNDIS Initialize Complete Message Structure.
|
||||
*
|
||||
* Type define for a RNDIS Initialize Complete response message.
|
||||
|
|
@ -190,7 +190,7 @@
|
|||
uint32_t MessageLength;
|
||||
uint32_t RequestId;
|
||||
uint32_t Status;
|
||||
|
||||
|
||||
uint32_t MajorVersion;
|
||||
uint32_t MinorVersion;
|
||||
uint32_t DeviceFlags;
|
||||
|
|
@ -201,7 +201,7 @@
|
|||
uint32_t AFListOffset;
|
||||
uint32_t AFListSize;
|
||||
} RNDIS_Initialize_Complete_t;
|
||||
|
||||
|
||||
/** \brief RNDIS Keep Alive Message Structure.
|
||||
*
|
||||
* Type define for a RNDIS Keep Alive command message.
|
||||
|
|
@ -237,7 +237,7 @@
|
|||
|
||||
uint32_t AddressingReset;
|
||||
} RNDIS_Reset_Complete_t;
|
||||
|
||||
|
||||
/** \brief RNDIS OID Property Set Message Structure.
|
||||
*
|
||||
* Type define for a RNDIS OID Property Set command message.
|
||||
|
|
@ -247,7 +247,7 @@
|
|||
uint32_t MessageType;
|
||||
uint32_t MessageLength;
|
||||
uint32_t RequestId;
|
||||
|
||||
|
||||
uint32_t Oid;
|
||||
uint32_t InformationBufferLength;
|
||||
uint32_t InformationBufferOffset;
|
||||
|
|
@ -265,7 +265,7 @@
|
|||
uint32_t RequestId;
|
||||
uint32_t Status;
|
||||
} RNDIS_Set_Complete_t;
|
||||
|
||||
|
||||
/** \brief RNDIS OID Property Query Message Structure.
|
||||
*
|
||||
* Type define for a RNDIS OID Property Query command message.
|
||||
|
|
@ -275,13 +275,13 @@
|
|||
uint32_t MessageType;
|
||||
uint32_t MessageLength;
|
||||
uint32_t RequestId;
|
||||
|
||||
|
||||
uint32_t Oid;
|
||||
uint32_t InformationBufferLength;
|
||||
uint32_t InformationBufferOffset;
|
||||
uint32_t DeviceVcHandle;
|
||||
} RNDIS_Query_Message_t;
|
||||
|
||||
|
||||
/** \brief RNDIS OID Property Query Complete Message Structure.
|
||||
*
|
||||
* Type define for a RNDIS OID Property Query Complete response message.
|
||||
|
|
@ -292,16 +292,17 @@
|
|||
uint32_t MessageLength;
|
||||
uint32_t RequestId;
|
||||
uint32_t Status;
|
||||
|
||||
|
||||
uint32_t InformationBufferLength;
|
||||
uint32_t InformationBufferOffset;
|
||||
} RNDIS_Query_Complete_t;
|
||||
|
||||
|
||||
/* Disable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
* RNDIS specification related constants. For more information on these
|
||||
* constants, please refer to the Microsoft RNDIS specification.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _RNDIS_CONSTANTS_DEVICE_H_
|
||||
#define _RNDIS_CONSTANTS_DEVICE_H_
|
||||
|
||||
|
|
@ -61,19 +61,19 @@
|
|||
#define REMOTE_NDIS_SET_CMPLT 0x80000005UL
|
||||
#define REMOTE_NDIS_RESET_CMPLT 0x80000006UL
|
||||
#define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008UL
|
||||
|
||||
|
||||
#define REMOTE_NDIS_STATUS_SUCCESS 0x00000000UL
|
||||
#define REMOTE_NDIS_STATUS_FAILURE 0xC0000001UL
|
||||
#define REMOTE_NDIS_STATUS_INVALID_DATA 0xC0010015UL
|
||||
#define REMOTE_NDIS_STATUS_NOT_SUPPORTED 0xC00000BBUL
|
||||
#define REMOTE_NDIS_STATUS_MEDIA_CONNECT 0x4001000BUL
|
||||
#define REMOTE_NDIS_STATUS_MEDIA_DISCONNECT 0x4001000CUL
|
||||
|
||||
|
||||
#define REMOTE_NDIS_MEDIA_STATE_CONNECTED 0x00000000UL
|
||||
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL
|
||||
|
||||
|
||||
#define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL
|
||||
|
||||
|
||||
#define REMOTE_NDIS_DF_CONNECTIONLESS 0x00000001UL
|
||||
#define REMOTE_NDIS_DF_CONNECTION_ORIENTED 0x00000002UL
|
||||
|
||||
|
|
@ -88,8 +88,8 @@
|
|||
#define REMOTE_NDIS_PACKET_GROUP 0x00001000UL
|
||||
#define REMOTE_NDIS_PACKET_ALL_FUNCTIONAL 0x00002000UL
|
||||
#define REMOTE_NDIS_PACKET_FUNCTIONAL 0x00004000UL
|
||||
#define REMOTE_NDIS_PACKET_MAC_FRAME 0x00008000UL
|
||||
|
||||
#define REMOTE_NDIS_PACKET_MAC_FRAME 0x00008000UL
|
||||
|
||||
#define OID_GEN_SUPPORTED_LIST 0x00010101UL
|
||||
#define OID_GEN_HARDWARE_STATUS 0x00010102UL
|
||||
#define OID_GEN_MEDIA_SUPPORTED 0x00010103UL
|
||||
|
|
@ -119,3 +119,4 @@
|
|||
#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103UL
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2010.
|
||||
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.fourwalledcubicle.com
|
||||
*/
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
/*
|
||||
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaim all warranties with regard to this
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
#include "../../USB.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* Enable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
#if !defined(__INCLUDE_FROM_SI_DRIVER)
|
||||
#error Do not include this file directly. Include LUFA/Drivers/Class/StillImage.h instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros: */
|
||||
/** Length in bytes of a given Unicode string's character length.
|
||||
*
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
* \return Number of bytes of the given unicode string.
|
||||
*/
|
||||
#define UNICODE_STRING_LENGTH(Chars) ((Chars) << 1)
|
||||
|
||||
|
||||
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
|
||||
* a command container.
|
||||
*
|
||||
|
|
@ -97,8 +97,8 @@
|
|||
SI_PIMA_CONTAINER_DataBlock = 2, /**< Data Block container type. */
|
||||
SI_PIMA_CONTAINER_ResponseBlock = 3, /**< Response container type. */
|
||||
SI_PIMA_CONTAINER_EventBlock = 4, /**< Event Block container type. */
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/* Enums: */
|
||||
/** Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device. */
|
||||
enum SI_PIMA_ResponseCodes_t
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
* parameters are not supported by the device.
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
/* Type Defines: */
|
||||
/** \brief PIMA Still Image Device Command/Response Container.
|
||||
*
|
||||
|
|
@ -133,12 +133,13 @@
|
|||
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). */
|
||||
} SI_PIMA_Container_t;
|
||||
|
||||
|
||||
/* Disable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue