From b120c4e4cda5b5ed12a61697b5ab33d4dd0a70e8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 28 Oct 2010 07:52:52 +0000 Subject: Move RNDISConstants.h into the RNDIS class driver common definition header. Add logical grouping of related #define values for better Doxygen documentation. --- LUFA/Drivers/Board/EVK527/AT45DB321C.h | 6 ++ LUFA/Drivers/Board/STK525/AT45DB321C.h | 6 ++ LUFA/Drivers/Board/STK526/AT45DB642D.h | 6 ++ LUFA/Drivers/Board/USBKEY/AT45DB642D.h | 6 ++ LUFA/Drivers/Board/XPLAIN/AT45DB642D.h | 6 ++ LUFA/Drivers/Misc/TerminalCodes.h | 20 +++- LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h | 17 +++- LUFA/Drivers/Peripheral/SPI.h | 21 ++++- LUFA/Drivers/USB/Class/Common/Audio.h | 11 ++- LUFA/Drivers/USB/Class/Common/CDC.h | 5 +- LUFA/Drivers/USB/Class/Common/HID.h | 8 +- LUFA/Drivers/USB/Class/Common/MIDI.h | 3 + LUFA/Drivers/USB/Class/Common/MassStorage.h | 20 +++- LUFA/Drivers/USB/Class/Common/Printer.h | 3 + LUFA/Drivers/USB/Class/Common/RNDIS.h | 93 ++++++++++++++++++- LUFA/Drivers/USB/Class/Common/RNDISConstants.h | 122 ------------------------- LUFA/Drivers/USB/HighLevel/StdDescriptors.h | 18 +++- LUFA/Drivers/USB/HighLevel/StdRequestType.h | 12 +++ LUFA/Drivers/USB/LowLevel/Device.h | 5 +- LUFA/Drivers/USB/LowLevel/Endpoint.h | 10 +- LUFA/Drivers/USB/LowLevel/Pipe.h | 13 ++- LUFA/Drivers/USB/LowLevel/USBController.h | 8 +- 22 files changed, 271 insertions(+), 148 deletions(-) delete mode 100644 LUFA/Drivers/USB/Class/Common/RNDISConstants.h (limited to 'LUFA') diff --git a/LUFA/Drivers/Board/EVK527/AT45DB321C.h b/LUFA/Drivers/Board/EVK527/AT45DB321C.h index f51619a87..403b3069b 100644 --- a/LUFA/Drivers/Board/EVK527/AT45DB321C.h +++ b/LUFA/Drivers/Board/EVK527/AT45DB321C.h @@ -53,12 +53,17 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Dataflash Status Values */ + //@{ #define DF_STATUS_READY (1 << 7) #define DF_STATUS_COMPMISMATCH (1 << 6) #define DF_STATUS_SECTORPROTECTION_ON (1 << 1) + //@} #define DF_MANUFACTURER_ATMEL 0x1F + /** \name Dataflash Commands */ + //@{ #define DF_CMD_GETSTATUS 0xD7 #define DF_CMD_MAINMEMTOBUFF1 0x53 @@ -92,6 +97,7 @@ #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0xCF #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F + //@} #endif diff --git a/LUFA/Drivers/Board/STK525/AT45DB321C.h b/LUFA/Drivers/Board/STK525/AT45DB321C.h index 8b60780e8..ecd7e4432 100644 --- a/LUFA/Drivers/Board/STK525/AT45DB321C.h +++ b/LUFA/Drivers/Board/STK525/AT45DB321C.h @@ -53,12 +53,17 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Dataflash Status Values */ + //@{ #define DF_STATUS_READY (1 << 7) #define DF_STATUS_COMPMISMATCH (1 << 6) #define DF_STATUS_SECTORPROTECTION_ON (1 << 1) + //@} #define DF_MANUFACTURER_ATMEL 0x1F + /** \name Dataflash Commands */ + //@{ #define DF_CMD_GETSTATUS 0xD7 #define DF_CMD_MAINMEMTOBUFF1 0x53 @@ -92,6 +97,7 @@ #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0xCF #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F + //@} #endif diff --git a/LUFA/Drivers/Board/STK526/AT45DB642D.h b/LUFA/Drivers/Board/STK526/AT45DB642D.h index f1224fd38..aaebbadbe 100644 --- a/LUFA/Drivers/Board/STK526/AT45DB642D.h +++ b/LUFA/Drivers/Board/STK526/AT45DB642D.h @@ -53,13 +53,18 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Dataflash Status Values */ + //@{ #define DF_STATUS_READY (1 << 7) #define DF_STATUS_COMPMISMATCH (1 << 6) #define DF_STATUS_SECTORPROTECTION_ON (1 << 1) #define DF_STATUS_BINARYPAGESIZE_ON (1 << 0) + //@} #define DF_MANUFACTURER_ATMEL 0x1F + /** \name Dataflash Commands */ + //@{ #define DF_CMD_GETSTATUS 0xD7 #define DF_CMD_POWERDOWN 0xB9 #define DF_CMD_WAKEUP 0xAB @@ -102,6 +107,7 @@ #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0x9A #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F + //@} #endif diff --git a/LUFA/Drivers/Board/USBKEY/AT45DB642D.h b/LUFA/Drivers/Board/USBKEY/AT45DB642D.h index 6324c2fa6..a7a2fc618 100644 --- a/LUFA/Drivers/Board/USBKEY/AT45DB642D.h +++ b/LUFA/Drivers/Board/USBKEY/AT45DB642D.h @@ -53,13 +53,18 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Dataflash Status Values */ + //@{ #define DF_STATUS_READY (1 << 7) #define DF_STATUS_COMPMISMATCH (1 << 6) #define DF_STATUS_SECTORPROTECTION_ON (1 << 1) #define DF_STATUS_BINARYPAGESIZE_ON (1 << 0) + //@} #define DF_MANUFACTURER_ATMEL 0x1F + /** \name Dataflash Commands */ + //@{ #define DF_CMD_GETSTATUS 0xD7 #define DF_CMD_POWERDOWN 0xB9 #define DF_CMD_WAKEUP 0xAB @@ -102,6 +107,7 @@ #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0x9A #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F + //@} #endif diff --git a/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h b/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h index 1e52ca8e9..386af7693 100644 --- a/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h +++ b/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h @@ -53,13 +53,18 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Dataflash Status Values */ + //@{ #define DF_STATUS_READY (1 << 7) #define DF_STATUS_COMPMISMATCH (1 << 6) #define DF_STATUS_SECTORPROTECTION_ON (1 << 1) #define DF_STATUS_BINARYPAGESIZE_ON (1 << 0) + //@} #define DF_MANUFACTURER_ATMEL 0x1F + /** \name Dataflash Commands */ + //@{ #define DF_CMD_GETSTATUS 0xD7 #define DF_CMD_POWERDOWN 0xB9 #define DF_CMD_WAKEUP 0xAB @@ -102,6 +107,7 @@ #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0x9A #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F + //@} #endif diff --git a/LUFA/Drivers/Misc/TerminalCodes.h b/LUFA/Drivers/Misc/TerminalCodes.h index 85841c50d..25037cc91 100644 --- a/LUFA/Drivers/Misc/TerminalCodes.h +++ b/LUFA/Drivers/Misc/TerminalCodes.h @@ -72,9 +72,8 @@ #define ANSI_ESCAPE_SEQUENCE(c) #endif - /** Resets any escape sequence modifiers back to their defaults. */ - #define ESC_RESET ANSI_ESCAPE_SEQUENCE("0m") - + /** \name Text Display Modifier Escape Sequences */ + //@{ /** Turns on bold so that any following text is printed to the terminal in bold. */ #define ESC_BOLD_ON ANSI_ESCAPE_SEQUENCE("1m") @@ -108,7 +107,10 @@ * the center. */ #define ESC_STRIKETHROUGH_OFF ANSI_ESCAPE_SEQUENCE("29m") - + //@} + + /** \name Text Colour Control Sequences */ + //@{ /** Sets the foreground (text) colour to black. */ #define ESC_FG_BLACK ANSI_ESCAPE_SEQUENCE("30m") @@ -162,7 +164,10 @@ /** Sets the text background colour to the terminal's default. */ #define ESC_BG_DEFAULT ANSI_ESCAPE_SEQUENCE("49m") + //@} + /** \name Cursor Positioning Control Sequences */ + //@{ /** Sets the cursor position to the given line and column. */ #define ESC_CURSOR_POS(L, C) ANSI_ESCAPE_SEQUENCE(#L ";" #C "H") @@ -183,12 +188,19 @@ /** Restores the cursor position to the last position saved with \ref ESC_CURSOR_POS_SAVE. */ #define ESC_CURSOR_POS_RESTORE ANSI_ESCAPE_SEQUENCE("u") + //@} + + /** \name Miscellaneous Control Sequences */ + //@{ + /** Resets any escape sequence modifiers back to their defaults. */ + #define ESC_RESET ANSI_ESCAPE_SEQUENCE("0m") /** Erases the entire display, returning the cursor to the top left. */ #define ESC_ERASE_DISPLAY ANSI_ESCAPE_SEQUENCE("2J") /** Erases the current line, returning the cursor to the far left. */ #define ESC_ERASE_LINE ANSI_ESCAPE_SEQUENCE("K") + //@} #endif diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h index 504061beb..4790668cd 100644 --- a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h +++ b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h @@ -71,6 +71,8 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name ADC Reference Configuration Masks */ + //@{ /** Reference mask, for using the voltage present at the AVR's AREF pin for the ADC reference. */ #define ADC_REFERENCE_AREF 0 @@ -79,7 +81,10 @@ /** Reference mask, for using the internally generated 2.56V reference voltage as the ADC reference. */ #define ADC_REFERENCE_INT2560MV ((1 << REFS1) | (1 << REFS0)) - + //@} + + /** \name ADC Result Adjustment Configuration Masks */ + //@{ /** Left-adjusts the 10-bit ADC result, so that the upper 8 bits of the value returned by the * ADC_GetResult() macro contain the 8 most significant bits of the result. */ @@ -89,7 +94,10 @@ * ADC_GetResult() macro contain the 8 least significant bits of the result. */ #define ADC_RIGHT_ADJUSTED (0 << ADLAR) + //@} + /** \name ADC Mode Configuration Masks */ + //@{ /** Sets the ADC mode to free running, so that conversions take place continuously as fast as the ADC * is capable of at the given input clock speed. */ @@ -99,7 +107,10 @@ * the ADC returns to idle. */ #define ADC_SINGLE_CONVERSION (0 << ADATE) - + //@} + + /** \name ADC Prescaler Configuration Masks */ + //@{ /** Sets the ADC input clock to prescale by a factor of 2 the AVR's system clock. */ #define ADC_PRESCALE_2 (1 << ADPS0) @@ -120,7 +131,9 @@ /** Sets the ADC input clock to prescale by a factor of 128 the AVR's system clock. */ #define ADC_PRESCALE_128 ((1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0)) + //@} + /** \name ADC MUX Masks */ //@{ /** MUX mask define for the ADC0 channel of the ADC. See \ref ADC_StartReading and \ref ADC_GetChannelReading. */ #define ADC_CHANNEL0 (0x00 << MUX0) diff --git a/LUFA/Drivers/Peripheral/SPI.h b/LUFA/Drivers/Peripheral/SPI.h index d8002b2e3..4e1fd09ce 100644 --- a/LUFA/Drivers/Peripheral/SPI.h +++ b/LUFA/Drivers/Peripheral/SPI.h @@ -67,6 +67,8 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name SPI Prescaler Configuration Masks */ + //@{ /** SPI prescaler mask for SPI_Init(). Divides the system clock by a factor of 2. */ #define SPI_SPEED_FCPU_DIV_2 SPI_USE_DOUBLESPEED @@ -87,31 +89,44 @@ /** SPI prescaler mask for SPI_Init(). Divides the system clock by a factor of 128. */ #define SPI_SPEED_FCPU_DIV_128 ((1 << SPR1) | (1 << SPR0)) + //@} + /** \name SPI SCK Polarity Configuration Masks */ + //@{ /** SPI clock polarity mask for SPI_Init(). Indicates that the SCK should lead on the rising edge. */ #define SPI_SCK_LEAD_RISING (0 << CPOL) /** SPI clock polarity mask for SPI_Init(). Indicates that the SCK should lead on the falling edge. */ #define SPI_SCK_LEAD_FALLING (1 << CPOL) + //@} + /** \name SPI Sample Edge Configuration Masks */ + //@{ /** SPI data sample mode mask for SPI_Init(). Indicates that the data should sampled on the leading edge. */ #define SPI_SAMPLE_LEADING (0 << CPHA) /** SPI data sample mode mask for SPI_Init(). Indicates that the data should be sampled on the trailing edge. */ #define SPI_SAMPLE_TRAILING (1 << CPHA) - + //@} + + /** \name SPI Data Ordering Configuration Masks */ + //@{ /** SPI data order mask for SPI_Init(). Indicates that data should be shifted out MSB first. */ #define SPI_ORDER_MSB_FIRST (0 << DORD) /** SPI data order mask for SPI_Init(). Indicates that data should be shifted out MSB first. */ #define SPI_ORDER_LSB_FIRST (1 << DORD) - + //@} + + /** \name SPI Mode Configuration Masks */ + //@{ /** SPI mode mask for SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */ #define SPI_MODE_SLAVE (0 << MSTR) /** SPI mode mask for SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */ #define SPI_MODE_MASTER (1 << MSTR) - + //@} + /* Inline Functions: */ /** Initialises the SPI subsystem, ready for transfers. Must be called before calling any other * SPI routines. 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 @@ -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 - diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h index 717c935e6..c650b5b7f 100644 --- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h +++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h @@ -119,6 +119,8 @@ */ #define LANGUAGE_ID_ENG 0x0409 + /** \name Endpoint Address Direction Masks */ + //@{ /** Can be masked with an endpoint address for a \ref USB_Descriptor_Endpoint_t endpoint descriptor's * EndpointAddress value to indicate to the host that the endpoint is of the IN direction (i.e, from * device to host). @@ -130,7 +132,10 @@ * host to device). */ #define ENDPOINT_DESCRIPTOR_DIR_OUT 0x00 + //@} + /** \name USB Configuration Descriptor Attribute Masks */ + //@{ /** Can be masked with other configuration descriptor attributes for a \ref USB_Descriptor_Configuration_Header_t * descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power * from the host's VBUS line. @@ -149,7 +154,10 @@ * request. */ #define USB_CONFIG_ATTR_REMOTEWAKEUP 0x20 - + //@} + + /** \name Endpoint Descriptor Attribute Masks */ + //@{ /** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's * Attributes value to indicate that the specified endpoint is not synchronized. * @@ -177,7 +185,10 @@ * \see The USB specification for more details on the possible Endpoint attributes. */ #define ENDPOINT_ATTR_SYNC (3 << 2) - + //@} + + /** \name Endpoint Descriptor Usage Masks */ + //@{ /** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's * Attributes value to indicate that the specified endpoint is used for data transfers. * @@ -198,7 +209,8 @@ * \see The USB specification for more details on the possible Endpoint usage attributes. */ #define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (2 << 4) - + //@} + /* Enums: */ /** Enum for the possible standard descriptor types, as given in each descriptor's header. */ enum USB_DescriptorTypes_t diff --git a/LUFA/Drivers/USB/HighLevel/StdRequestType.h b/LUFA/Drivers/USB/HighLevel/StdRequestType.h index 7432798f6..02afc9654 100644 --- a/LUFA/Drivers/USB/HighLevel/StdRequestType.h +++ b/LUFA/Drivers/USB/HighLevel/StdRequestType.h @@ -81,6 +81,8 @@ */ #define CONTROL_REQTYPE_RECIPIENT 0x1F + /** \name Control Request Data Direction Masks */ + //@{ /** Request data direction mask, indicating that the request data will flow from host to device. * * \see \ref CONTROL_REQTYPE_DIRECTION macro. @@ -92,7 +94,10 @@ * \see \ref CONTROL_REQTYPE_DIRECTION macro. */ #define REQDIR_DEVICETOHOST (1 << 7) + //@} + /** \name Control Request Type Masks */ + //@{ /** Request type mask, indicating that the request is a standard request. * * \see \ref CONTROL_REQTYPE_TYPE macro. @@ -110,7 +115,10 @@ * \see \ref CONTROL_REQTYPE_TYPE macro. */ #define REQTYPE_VENDOR (2 << 5) + //@} + /** \name Control Request Recipient Masks */ + //@{ /** Request recipient mask, indicating that the request is to be issued to the device as a whole. * * \see \ref CONTROL_REQTYPE_RECIPIENT macro. @@ -137,7 +145,10 @@ * \see \ref CONTROL_REQTYPE_RECIPIENT macro. */ #define REQREC_OTHER (3 << 0) + //@} + /** \name Feature Request Types */ + //@{ /** Feature indicator for Clear Feature or Set Feature commands. When used in a Clear Feature * request this indicates that an endpoint (whose address is given elsewhere in the request * should have its stall condition cleared. If used in a similar manner inside a Set Feature @@ -151,6 +162,7 @@ * request, this re-enabled the remote wakeup feature on the device. */ #define FEATURE_REMOTE_WAKEUP 0x01 + //@} /* Type Defines: */ /** \brief Standard USB Control Request diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index 1452d15f5..3c5d7cf4f 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -70,6 +70,8 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name USB Device Mode Option Masks */ + //@{ #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__) /** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the * USB interface should be initialized in low speed (1.5Mb/s) mode. @@ -87,7 +89,8 @@ * USB interface should be initialized in full speed (12Mb/s) mode. */ #define USB_DEVICE_OPT_FULLSPEED (0 << 0) - + //@} + /* Function Prototypes: */ /** Sends a Remote Wakeup request to the host. This signals to the host that the device should * be taken out of suspended mode, and communications should resume. diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index 54a2d8dd8..e0a45f378 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -146,6 +146,8 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Endpoint Direction Masks */ + //@{ /** Endpoint data direction mask for \ref Endpoint_ConfigureEndpoint(). This indicates that the endpoint * should be initialized in the OUT direction - i.e. data flows from host to device. */ @@ -155,7 +157,10 @@ * should be initialized in the IN direction - i.e. data flows from device to host. */ #define ENDPOINT_DIR_IN (1 << EPDIR) - + //@} + + /** \name Endpoint Bank Mode Masks */ + //@{ /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates * that the endpoint should have one single bank, which requires less USB FIFO memory but results * in slower transfers as only one USB device (the AVR or the host) can access the endpoint's @@ -169,7 +174,8 @@ * accesses the second bank. */ #define ENDPOINT_BANK_DOUBLE (1 << EPBK0) - + //@} + /** Endpoint address for the default control endpoint, which always resides in address 0. This is * defined for convenience to give more readable code when used with the endpoint macros. */ diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 62d0935dc..8cf48cd0a 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -98,6 +98,8 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name Pipe Error Flag Masks */ + //@{ /** Mask for \ref Pipe_GetErrorFlags(), indicating that an overflow error occurred in the pipe on the received data. */ #define PIPE_ERRORFLAG_OVERFLOW (1 << 6) @@ -118,7 +120,10 @@ /** Mask for \ref Pipe_GetErrorFlags(), indicating that a hardware data toggle error occurred in the pipe. */ #define PIPE_ERRORFLAG_DATATGL (1 << 0) + //@} + /** \name Pipe Token Masks */ + //@{ /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes), * which will trigger a control request on the attached device when data is written to the pipe. */ @@ -133,7 +138,10 @@ * indicating that the pipe data will flow from host to device. */ #define PIPE_TOKEN_OUT (2 << PTOKEN0) - + //@} + + /** \name Pipe Bank Mode Masks */ + //@{ /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe * should have one single bank, which requires less USB FIFO memory but results in slower transfers as * only one USB device (the AVR or the attached device) can access the pipe's bank at the one time. @@ -146,7 +154,8 @@ * bank. */ #define PIPE_BANK_DOUBLE (1 << EPBK0) - + //@} + /** Pipe address for the default control pipe, which always resides in address 0. This is * defined for convenience to give more readable code when used with the pipe macros. */ diff --git a/LUFA/Drivers/USB/LowLevel/USBController.h b/LUFA/Drivers/USB/LowLevel/USBController.h index 34bfef028..47233bc75 100644 --- a/LUFA/Drivers/USB/LowLevel/USBController.h +++ b/LUFA/Drivers/USB/LowLevel/USBController.h @@ -123,6 +123,8 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** \name USB Controller Option Masks */ + //@{ /** Regulator disable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad * regulator should be enabled to regulate the data pin voltages to within the USB standard. * @@ -148,7 +150,10 @@ * that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations. */ #define USB_OPT_AUTO_PLL (0 << 2) - + //@} + + /** \name Endpoint/Pipe Type Masks */ + //@{ /** Mask for a CONTROL type endpoint or pipe. * * \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions. @@ -172,6 +177,7 @@ * \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions. */ #define EP_TYPE_INTERRUPT 0x03 + //@} #if !defined(USB_STREAM_TIMEOUT_MS) || defined(__DOXYGEN__) /** Constant for the maximum software timeout period of the USB data stream transfer functions -- cgit v1.2.3