Move RNDISConstants.h into the RNDIS class driver common definition header.

Add logical grouping of related #define values for better Doxygen documentation.
pull/1469/head
Dean Camera 14 years ago
parent cb779e3d7d
commit b120c4e4cd

File diff suppressed because one or more lines are too long

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

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

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

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

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

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

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

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

@ -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.
*

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

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

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

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

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

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

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

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

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

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

@ -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.
*/

@ -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.
*/

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

Loading…
Cancel
Save