diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-10-28 07:52:52 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-10-28 07:52:52 +0000 |
commit | b120c4e4cda5b5ed12a61697b5ab33d4dd0a70e8 (patch) | |
tree | e226bca6aee1711db57cb08be60a71c656b08193 /LUFA/Drivers/USB/Class | |
parent | cb779e3d7d32d7c43e0a45bb526de0a04135b0c7 (diff) | |
download | lufa-b120c4e4cda5b5ed12a61697b5ab33d4dd0a70e8.tar.gz lufa-b120c4e4cda5b5ed12a61697b5ab33d4dd0a70e8.tar.bz2 lufa-b120c4e4cda5b5ed12a61697b5ab33d4dd0a70e8.zip |
Move RNDISConstants.h into the RNDIS class driver common definition header.
Add logical grouping of related #define values for better Doxygen documentation.
Diffstat (limited to 'LUFA/Drivers/USB/Class')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/Audio.h | 11 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/CDC.h | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/HID.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/MIDI.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/MassStorage.h | 20 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/Printer.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/RNDIS.h | 93 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/RNDISConstants.h | 122 |
8 files changed, 135 insertions, 130 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h index ae941335c..c10e499ad 100644 --- a/LUFA/Drivers/USB/Class/Common/Audio.h +++ b/LUFA/Drivers/USB/Class/Common/Audio.h @@ -72,7 +72,9 @@ */ #define AUDIO_TOTAL_SAMPLE_RATES 1 #endif - + + /** \name Audio Channel Masks */ + //@{ /** Supported channel mask for an Audio class terminal descriptor. See the Audio class specification for more details. */ #define AUDIO_CHANNEL_LEFT_FRONT (1 << 0) @@ -108,7 +110,10 @@ /** Supported channel mask for an Audio class terminal descriptor. See the Audio class specification for more details. */ #define AUDIO_CHANNEL_TOP (1 << 11) + //@} + /** \name Audio Feature Masks */ + //@{ /** Supported feature mask for an Audio class feature unit descriptor. See the Audio class specification for more details. */ #define AUDIO_FEATURE_MUTE (1 << 0) @@ -138,7 +143,10 @@ /** 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) + //@} + /** \name Audio Terminal Types */ + //@{ /** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */ #define AUDIO_TERMINAL_UNDEFINED 0x0100 @@ -192,6 +200,7 @@ /** 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. * diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h index 48ea1964c..aaaf12144 100644 --- a/LUFA/Drivers/USB/Class/Common/CDC.h +++ b/LUFA/Drivers/USB/Class/Common/CDC.h @@ -66,6 +66,8 @@ #endif /* Macros: */ + /** \name Virtual Control Line Masks */ + //@{ /** 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. */ @@ -110,7 +112,8 @@ * 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 diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h index 873ef1653..211216ba3 100644 --- a/LUFA/Drivers/USB/Class/Common/HID.h +++ b/LUFA/Drivers/USB/Class/Common/HID.h @@ -61,6 +61,8 @@ #endif /* Macros: */ + /** \name Keyboard Standard Report Modifier Masks */ + //@{ /** 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,7 +86,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) - + //@} + + /** \name Keyboard Standard Report LED Masks */ + //@{ /** 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) @@ -96,6 +101,7 @@ /** Constant for a keyboard output report LED byte, indicating that the host's KATANA mode is currently set. */ #define HID_KEYBOARD_LED_KATANA (1 << 3) + //@} /* Type Defines: */ /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the HID diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h index 53cef324f..efab81820 100644 --- a/LUFA/Drivers/USB/Class/Common/MIDI.h +++ b/LUFA/Drivers/USB/Class/Common/MIDI.h @@ -70,11 +70,14 @@ #endif /* Macros: */ + /** \name MIDI Command Values */ + //@{ /** MIDI command for a note on (activation) event. */ #define MIDI_COMMAND_NOTE_ON 0x90 /** MIDI command for a note off (deactivation) event. */ #define MIDI_COMMAND_NOTE_OFF 0x80 + //@} /** Standard key press velocity value used for all note events. */ #define MIDI_STANDARD_VELOCITY 64 diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h index e9ac3cf99..1e0c4546d 100644 --- a/LUFA/Drivers/USB/Class/Common/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h @@ -78,6 +78,8 @@ /** Mask for a Command Block Wrapper's flags attribute to specify a command with data sent from device-to-host. */ #define MS_COMMAND_DIR_DATA_IN (1 << 7) + /** \name SCSI Commands*/ + //@{ /** SCSI Command Code for an INQUIRY command. */ #define SCSI_CMD_INQUIRY 0x12 @@ -116,7 +118,10 @@ /** SCSI Command Code for a MODE SENSE (10) command. */ #define SCSI_CMD_MODE_SENSE_10 0x5A - + //@} + + /** \name SCSI Sense Key Values */ + //@{ /** SCSI Sense Code to indicate no error has occurred. */ #define SCSI_SENSE_KEY_GOOD 0x00 @@ -160,7 +165,10 @@ /** SCSI Sense Code to indicate that the source data did not match the data read from the medium. */ #define SCSI_SENSE_KEY_MISCOMPARE 0x0E - + //@} + + /** \name SCSI Additional Sense Codes */ + //@{ /** SCSI Additional Sense Code to indicate no additional sense information is available. */ #define SCSI_ASENSE_NO_ADDITIONAL_INFORMATION 0x00 @@ -189,7 +197,10 @@ /** SCSI Additional Sense Code to indicate that no removable medium is inserted into the device. */ #define SCSI_ASENSE_MEDIUM_NOT_PRESENT 0x3A - + //@} + + /** \name SCSI Additional Sense Key Code Qualifiers */ + //@{ /** SCSI Additional Sense Qualifier Code to indicate no additional sense qualifier information is available. */ #define SCSI_ASENSEQ_NO_QUALIFIER 0x00 @@ -203,7 +214,8 @@ /** SCSI Additional Sense Qualifier Code to indicate that an operation is currently in progress. */ #define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07 - + //@} + /* Enums: */ /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Mass * Storage device class. diff --git a/LUFA/Drivers/USB/Class/Common/Printer.h b/LUFA/Drivers/USB/Class/Common/Printer.h index e0b2251cf..20a862daa 100644 --- a/LUFA/Drivers/USB/Class/Common/Printer.h +++ b/LUFA/Drivers/USB/Class/Common/Printer.h @@ -66,6 +66,8 @@ #endif /* Macros: */ + /** \name Virtual Printer Status Line Masks */ + //@{ /** Port status mask for a printer device, indicating that an error has *not* occurred. */ #define PRNT_PORTSTATUS_NOTERROR (1 << 3) @@ -74,6 +76,7 @@ /** Port status mask for a printer device, indicating that the device is currently out of paper. */ #define PRNT_PORTSTATUS_PAPEREMPTY (1 << 5) + //@} /* Enums: */ /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Printer diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h index d55a80411..79aae7f89 100644 --- a/LUFA/Drivers/USB/Class/Common/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h @@ -55,7 +55,6 @@ /* Includes: */ #include "../../HighLevel/StdDescriptors.h" - #include "RNDISConstants.h" #include "CDC.h" #include <string.h> @@ -77,6 +76,98 @@ /** Implemented RNDIS Version Minor. */ #define REMOTE_NDIS_VERSION_MINOR 0x00 + /** \name RNDIS Message Values */ + //@{ + #define REMOTE_NDIS_PACKET_MSG 0x00000001UL + #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002UL + #define REMOTE_NDIS_HALT_MSG 0x00000003UL + #define REMOTE_NDIS_QUERY_MSG 0x00000004UL + #define REMOTE_NDIS_SET_MSG 0x00000005UL + #define REMOTE_NDIS_RESET_MSG 0x00000006UL + #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007UL + #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008UL + //@} + + /** \name RNDIS Response Values */ + //@{ + #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002UL + #define REMOTE_NDIS_QUERY_CMPLT 0x80000004UL + #define REMOTE_NDIS_SET_CMPLT 0x80000005UL + #define REMOTE_NDIS_RESET_CMPLT 0x80000006UL + #define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008UL + //@} + + /** \name RNDIS Status Values */ + //@{ + #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 + //@} + + /** \name RNDIS Media States */ + //@{ + #define REMOTE_NDIS_MEDIA_STATE_CONNECTED 0x00000000UL + #define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL + //@} + + #define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL + + /** \name RNDIS Connection Types */ + //@{ + #define REMOTE_NDIS_DF_CONNECTIONLESS 0x00000001UL + #define REMOTE_NDIS_DF_CONNECTION_ORIENTED 0x00000002UL + //@} + + /** \name RNDIS Packet Types */ + //@{ + #define REMOTE_NDIS_PACKET_DIRECTED 0x00000001UL + #define REMOTE_NDIS_PACKET_MULTICAST 0x00000002UL + #define REMOTE_NDIS_PACKET_ALL_MULTICAST 0x00000004UL + #define REMOTE_NDIS_PACKET_BROADCAST 0x00000008UL + #define REMOTE_NDIS_PACKET_SOURCE_ROUTING 0x00000010UL + #define REMOTE_NDIS_PACKET_PROMISCUOUS 0x00000020UL + #define REMOTE_NDIS_PACKET_SMT 0x00000040UL + #define REMOTE_NDIS_PACKET_ALL_LOCAL 0x00000080UL + #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 + //@} + + /** \name RNDIS OID Values */ + //@{ + #define OID_GEN_SUPPORTED_LIST 0x00010101UL + #define OID_GEN_HARDWARE_STATUS 0x00010102UL + #define OID_GEN_MEDIA_SUPPORTED 0x00010103UL + #define OID_GEN_MEDIA_IN_USE 0x00010104UL + #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106UL + #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111UL + #define OID_GEN_LINK_SPEED 0x00010107UL + #define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010AUL + #define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010BUL + #define OID_GEN_VENDOR_ID 0x0001010CUL + #define OID_GEN_VENDOR_DESCRIPTION 0x0001010DUL + #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010EUL + #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111UL + #define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114UL + #define OID_GEN_PHYSICAL_MEDIUM 0x00010202UL + #define OID_GEN_XMIT_OK 0x00020101UL + #define OID_GEN_RCV_OK 0x00020102UL + #define OID_GEN_XMIT_ERROR 0x00020103UL + #define OID_GEN_RCV_ERROR 0x00020104UL + #define OID_GEN_RCV_NO_BUFFER 0x00020105UL + #define OID_802_3_PERMANENT_ADDRESS 0x01010101UL + #define OID_802_3_CURRENT_ADDRESS 0x01010102UL + #define OID_802_3_MULTICAST_LIST 0x01010103UL + #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104UL + #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101UL + #define OID_802_3_XMIT_ONE_COLLISION 0x01020102UL + #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103UL + //@} + /** Maximum size in bytes of a RNDIS control message which can be sent or received. */ #define RNDIS_MESSAGE_BUFFER_SIZE 128 diff --git a/LUFA/Drivers/USB/Class/Common/RNDISConstants.h b/LUFA/Drivers/USB/Class/Common/RNDISConstants.h deleted file mode 100644 index 71df17461..000000000 --- a/LUFA/Drivers/USB/Class/Common/RNDISConstants.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2010. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - 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 - 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 - software without specific, written prior permission. - - The author disclaim all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * \brief Common RNDIS class constant definitions. - * - * Common RNDIS class constant definitions. - * - * \note This file should not be included directly. It is automatically included as needed by the USB module driver - * dispatch header located in LUFA/Drivers/USB.h. - */ - -/** \file - * - * 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_ - - /* Macros: */ - #define REMOTE_NDIS_PACKET_MSG 0x00000001UL - #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002UL - #define REMOTE_NDIS_HALT_MSG 0x00000003UL - #define REMOTE_NDIS_QUERY_MSG 0x00000004UL - #define REMOTE_NDIS_SET_MSG 0x00000005UL - #define REMOTE_NDIS_RESET_MSG 0x00000006UL - #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007UL - #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008UL - - #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002UL - #define REMOTE_NDIS_QUERY_CMPLT 0x80000004UL - #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 - - #define REMOTE_NDIS_PACKET_DIRECTED 0x00000001UL - #define REMOTE_NDIS_PACKET_MULTICAST 0x00000002UL - #define REMOTE_NDIS_PACKET_ALL_MULTICAST 0x00000004UL - #define REMOTE_NDIS_PACKET_BROADCAST 0x00000008UL - #define REMOTE_NDIS_PACKET_SOURCE_ROUTING 0x00000010UL - #define REMOTE_NDIS_PACKET_PROMISCUOUS 0x00000020UL - #define REMOTE_NDIS_PACKET_SMT 0x00000040UL - #define REMOTE_NDIS_PACKET_ALL_LOCAL 0x00000080UL - #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 OID_GEN_SUPPORTED_LIST 0x00010101UL - #define OID_GEN_HARDWARE_STATUS 0x00010102UL - #define OID_GEN_MEDIA_SUPPORTED 0x00010103UL - #define OID_GEN_MEDIA_IN_USE 0x00010104UL - #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106UL - #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111UL - #define OID_GEN_LINK_SPEED 0x00010107UL - #define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010AUL - #define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010BUL - #define OID_GEN_VENDOR_ID 0x0001010CUL - #define OID_GEN_VENDOR_DESCRIPTION 0x0001010DUL - #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010EUL - #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111UL - #define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114UL - #define OID_GEN_PHYSICAL_MEDIUM 0x00010202UL - #define OID_GEN_XMIT_OK 0x00020101UL - #define OID_GEN_RCV_OK 0x00020102UL - #define OID_GEN_XMIT_ERROR 0x00020103UL - #define OID_GEN_RCV_ERROR 0x00020104UL - #define OID_GEN_RCV_NO_BUFFER 0x00020105UL - #define OID_802_3_PERMANENT_ADDRESS 0x01010101UL - #define OID_802_3_CURRENT_ADDRESS 0x01010102UL - #define OID_802_3_MULTICAST_LIST 0x01010103UL - #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104UL - #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101UL - #define OID_802_3_XMIT_ONE_COLLISION 0x01020102UL - #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103UL - -#endif - |