Commit 9257f4ab authored by Dean Camera's avatar Dean Camera
Browse files

Add briefs for the library core structures.

parent 05576760
......@@ -31,6 +31,8 @@
/** \file
* \brief Common definitions and declarations for the library USB Mass Storage Class driver.
*
* Common definitions and declarations for the library USB Mass Storage Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h.
*/
......@@ -204,7 +206,9 @@
#define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
/* Type defines: */
/** Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */
/** \brief Mass Storage Class Command Block Wrapper.
*
* Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */
typedef struct
{
uint32_t Signature; /**< Command block signature, must be CBW_SIGNATURE to indicate a valid Command Block */
......@@ -216,7 +220,10 @@
uint8_t SCSICommandData[16]; /**< Issued SCSI command in the Command Block */
} MS_CommandBlockWrapper_t;
/** Type define for a Command Status Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */
/** \brief Mass Storage Class Command Status Wrapper.
*
* Type define for a Command Status Wrapper, used in the Mass Storage Bulk-Only Transport protocol.
*/
typedef struct
{
uint32_t Signature; /**< Status block signature, must be CSW_SIGNATURE to indicate a valid Command Status */
......@@ -225,7 +232,9 @@
uint8_t Status; /**< Status code of the issued command - a value from the MassStorage_CommandStatusCodes_t enum */
} MS_CommandStatusWrapper_t;
/** Type define for a SCSI Sense structure. Structures of this type are filled out by the
/** \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 MassStore_RequestSense() function, indicating the current sense data of the
* device (giving explicit error codes for the last issued command). For details of the
* structure contents, refer to the SCSI specifications.
......@@ -251,7 +260,9 @@
uint8_t SenseKeySpecific[3];
} SCSI_Request_Sense_Response_t;
/** Type define for a SCSI Inquiry structure. Structures of this type are filled out by the
/** \brief Mass Storage Class SCSI Inquiry Structure.
*
* Type define for a SCSI Inquiry structure. Structures of this type are filled out by the
* device via the MassStore_Inquiry() function, retrieving the attached device's information.
* For details of the structure contents, refer to the SCSI specifications.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Common definitions and declarations for the library USB Printer Class driver.
*
* Common definitions and declarations for the library USB Printer Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/Printer.h.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Common definitions and declarations for the library USB RNDIS Class driver.
*
* Common definitions and declarations for the library USB RNDIS Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/RNDIS.h.
*/
......@@ -110,13 +112,19 @@
};
/* Type Defines: */
/** Type define for a physical MAC address of a device on a network */
/** \brief MAC Address Structure.
*
* Type define for a physical MAC address of a device on a network
*/
typedef struct
{
uint8_t Octets[6]; /**< Individual bytes of a MAC address */
} MAC_Address_t;
/** Type define for an Ethernet frame buffer. */
/** \brief RNDIS Ethernet Frame Packet Information Structure.
*
* Type define for an Ethernet frame buffer data and information structure.
*/
typedef struct
{
uint8_t FrameData[ETHERNET_FRAME_SIZE_MAX]; /**< Ethernet frame contents */
......@@ -124,14 +132,20 @@
bool FrameInBuffer; /**< Indicates if a frame is currently stored in the buffer */
} Ethernet_Frame_Info_t;
/** Type define for a RNDIS message header, sent before RNDIS messages */
/** \brief RNDIS Common Message Header Structure.
*
* Type define for a RNDIS message header, sent before RNDIS messages.
*/
typedef struct
{
uint32_t MessageType; /**< RNDIS message type, a REMOTE_NDIS_*_MSG constant */
uint32_t MessageLength; /**< Total length of the RNDIS message, in bytes */
} RNDIS_Message_Header_t;
/** Type define for a RNDIS packet message, used to encapsulate Ethernet packets sent to and from the adapter */
/** \brief RNDIS Message Structure.
*
* Type define for a RNDIS packet message, used to encapsulate Ethernet packets sent to and from the adapter.
*/
typedef struct
{
uint32_t MessageType;
......@@ -147,7 +161,10 @@
uint32_t Reserved;
} RNDIS_Packet_Message_t;
/** Type define for a RNDIS Initialize command message */
/** \brief RNDIS Initialization Message Structure.
*
* Type define for a RNDIS Initialize command message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -159,7 +176,10 @@
uint32_t MaxTransferSize;
} RNDIS_Initialize_Message_t;
/** Type define for a RNDIS Initialize complete response message */
/** \brief RNDIS Initialize Complete Message Structure.
*
* Type define for a RNDIS Initialize Complete response message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -178,7 +198,10 @@
uint32_t AFListSize;
} RNDIS_Initialize_Complete_t;
/** Type define for a RNDIS Keepalive command message */
/** \brief RNDIS Keep Alive Message Structure.
*
* Type define for a RNDIS Keep Alive command message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -186,7 +209,10 @@
uint32_t RequestId;
} RNDIS_KeepAlive_Message_t;
/** Type define for a RNDIS Keepalive complete message */
/** \brief RNDIS Keep Alive Complete Message Structure.
*
* Type define for a RNDIS Keep Alive Complete response message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -195,7 +221,10 @@
uint32_t Status;
} RNDIS_KeepAlive_Complete_t;
/** Type define for a RNDIS Reset complete message */
/** \brief RNDIS Reset Complete Message Structure.
*
* Type define for a RNDIS Reset Complete response message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -205,7 +234,10 @@
uint32_t AddressingReset;
} RNDIS_Reset_Complete_t;
/** Type define for a RNDIS Set command message */
/** \brief RNDIS OID Property Set Message Structure.
*
* Type define for a RNDIS OID Property Set command message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -218,7 +250,10 @@
uint32_t DeviceVcHandle;
} RNDIS_Set_Message_t;
/** Type define for a RNDIS Set complete response message */
/** \brief RNDIS OID Property Set Complete Message Structure.
*
* Type define for a RNDIS OID Property Set Complete response message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -227,7 +262,10 @@
uint32_t Status;
} RNDIS_Set_Complete_t;
/** Type define for a RNDIS Query command message */
/** \brief RNDIS OID Property Query Message Structure.
*
* Type define for a RNDIS OID Property Query command message.
*/
typedef struct
{
uint32_t MessageType;
......@@ -240,7 +278,10 @@
uint32_t DeviceVcHandle;
} RNDIS_Query_Message_t;
/** Type define for a RNDIS Query complete response message */
/** \brief RNDIS OID Property Query Complete Message Structure.
*
* Type define for a RNDIS OID Property Query Complete response message.
*/
typedef struct
{
uint32_t MessageType;
......
......@@ -31,6 +31,8 @@
/** \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 class driver
* dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Common definitions and declarations for the library USB Still Image Class driver.
*
* Common definitions and declarations for the library USB Still Image Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/StillImage.h.
*/
......@@ -120,7 +122,9 @@
};
/* Type Defines: */
/** Type define for a PIMA container, use to send commands and receive responses to and from an
/** \brief PIMA Still Image Device Command/Response Container.
*
* Type define for a PIMA container, use to send commands and receive responses to and from an
* attached Still Image device.
*/
typedef struct
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Device mode driver for the library USB Audio Class driver.
*
* Device mode driver for the library USB Audio Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
*/
......@@ -69,7 +71,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each Audio interface
/** \brief Audio Class Device Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made for each Audio interface
* within the user application, and passed to each of the Audio class driver functions as the
* AudioInterfaceInfo parameter. This stores each Audio interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Device mode driver for the library USB CDC Class driver.
*
* Device mode driver for the library USB CDC Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/CDC.h.
*/
......@@ -87,7 +89,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each CDC interface
/** \brief CDC Class Device Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made for each CDC interface
* within the user application, and passed to each of the CDC class driver functions as the
* CDCInterfaceInfo parameter. This stores each CDC interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Device mode driver for the library USB HID Class driver.
*
* Device mode driver for the library USB HID Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/HID.h.
*/
......@@ -69,7 +71,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each HID interface
/** \brief HID Class Device Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made for each HID interface
* within the user application, and passed to each of the HID class driver functions as the
* HIDInterfaceInfo parameter. This stores each HID interface's configuration and state information.
*
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Device mode driver for the library USB MIDI Class driver.
*
* Device mode driver for the library USB MIDI Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/MIDI.h.
*/
......@@ -69,7 +71,9 @@
/* Public Interface - May be used in end-application: */
/* Type Define: */
/** Class state structure. An instance of this structure should be made for each MIDI interface
/** \brief MIDI Class Device Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made for each MIDI interface
* within the user application, and passed to each of the MIDI class driver functions as the
* MIDIInterfaceInfo parameter. This stores each MIDI interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Device mode driver for the library USB Mass Storage Class driver.
*
* Device mode driver for the library USB Mass Storage Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h.
*/
......@@ -69,7 +71,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each Mass Storage interface
/** \brief Mass Storage Class Device Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made for each Mass Storage interface
* within the user application, and passed to each of the Mass Storage class driver functions as the
* MSInterfaceInfo parameter. This stores each Mass Storage interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Device mode driver for the library USB RNDIS Class driver.
*
* Device mode driver for the library USB RNDIS Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/RNDIS.h.
*/
......@@ -69,7 +71,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each RNDIS interface
/** \brief RNDIS Class Device Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made for each RNDIS interface
* within the user application, and passed to each of the RNDIS class driver functions as the
* RNDISInterfaceInfo parameter. This stores each RNDIS interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Master include file for the library USB HID Class driver.
*
* Master include file for the library USB HID Class driver, for both host and device modes, where available.
*
* This file should be included in all user projects making use of this optional class driver, instead of
* including any headers in the USB/ClassDriver/Device, USB/ClassDriver/Host or USB/ClassDriver/Common subdirectories.
*/
......
......@@ -29,10 +29,12 @@
*/
/** \file
* \brief Host mode driver for the library USB Audio Class driver.
* \brief Host mode driver for the library USB CDC Class driver.
*
* Host mode driver for the library USB CDC Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
* dispatch header located in LUFA/Drivers/USB/Class/CDC.h.
*/
/** \ingroup Group_USBClassCDC
......@@ -70,7 +72,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
/** \brief CDC Class Host Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the CDC class driver functions as the CDCInterfaceInfo parameter. This
* stores each CDC interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Host mode driver for the library USB HID Class driver.
*
* Host mode driver for the library USB HID Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/HID.h.
*/
......@@ -73,7 +75,9 @@
#define HID_ERROR_LOGICAL 0x80
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
/** \brief HID Class Host Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the HID class driver functions as the HIDInterfaceInfo parameter. This
* stores each HID interface's configuration and state information.
*/
......
......@@ -31,8 +31,8 @@
/** \file
* \brief USB Human Interface Device (HID) Class report descriptor parser.
*
* This file allows for the easy parsing of the complex HID report descriptor, which describes the data that
* the device transmits to the host. It also provides an easy API for extracting and processing the data
* This file allows for the easy parsing of complex HID report descriptors, which describes the data that
* a HID device transmits to the host. It also provides an easy API for extracting and processing the data
* elements inside a HID report sent from an attached HID device.
*/
......@@ -157,28 +157,39 @@
};
/* Type Defines: */
/** Type define for an attribute with both minimum and maximum values (e.g. Logical Min/Max). */
/** \brief HID Parser Report Item Min/Max Structure.
*
* Type define for an attribute with both minimum and maximum values (e.g. Logical Min/Max).
*/
typedef struct
{
uint32_t Minimum; /**< Minimum value for the attribute. */
uint32_t Maximum; /**< Maximum value for the attribute. */
} HID_MinMax_t;
/** Type define for the Unit attributes of a report item. */
/** \brief HID Parser Report Item Unit Structure.
*
* Type define for the Unit attributes of a report item.
*/
typedef struct
{
uint32_t Type; /**< Unit type (refer to HID specifications for details). */
uint8_t Exponent; /**< Unit exponent (refer to HID specifications for details). */
} HID_Unit_t;
/** Type define for the Usage attributes of a report item. */
/** \brief HID Parser Report Item Usage Structure.
*
* Type define for the Usage attributes of a report item.
*/
typedef struct
{
uint16_t Page; /**< Usage page of the report item. */
uint16_t Usage; /**< Usage of the report item. */
} HID_Usage_t;
/** Type define for a COLLECTION object. Contains the collection attributes and a reference to the
/** \brief HID Parser Report Item Collection Path Structure.
*
* Type define for a COLLECTION object. Contains the collection attributes and a reference to the
* parent collection if any.
*/
typedef struct CollectionPath
......@@ -188,7 +199,10 @@
struct CollectionPath* Parent; /**< Reference to parent collection, or NULL if root collection. */
} HID_CollectionPath_t;
/** Type define for all the data attributes of a report item, except flags. */
/** \brief HID Parser Report Item Attributes Structure.
*
* Type define for all the data attributes of a report item, except flags.
*/
typedef struct
{
uint8_t BitSize; /**< Size in bits of the report item's data. */
......@@ -199,7 +213,10 @@
HID_MinMax_t Physical; /**< Physical minimum and maximum of the report item. */
} HID_ReportItem_Attributes_t;
/** Type define for a report item (IN, OUT or FEATURE) attributes and other details. */
/** \brief HID Parser Report Item Details Structure.
*
* Type define for a report item (IN, OUT or FEATURE) layout attributes and other details.
*/
typedef struct
{
uint16_t BitOffset; /**< Bit offset in the IN, OUT or FEATURE report of the item. */
......@@ -216,7 +233,10 @@
uint32_t PreviousValue; /**< Previous value of the report item. */
} HID_ReportItem_t;
/** Type define for a report item size information structure */
/** \brief HID Parser Report Size Structure.
*
* Type define for a report item size information structure, to retain the size of a device's reports by ID.
*/
typedef struct
{
uint8_t ReportID; /** Report ID of the report within the HID interface */
......@@ -225,7 +245,10 @@
*/
} HID_ReportSizeInfo_t;
/** Type define for a complete processed HID report, including all report item data and collections. */
/** \brief HID Parser State Structure.
*
* Type define for a complete processed HID report, including all report item data and collections.
*/
typedef struct
{
uint8_t TotalReportItems; /**< Total number of report items stored in the
......
......@@ -31,7 +31,8 @@
/** \file
* \brief Constants for HID report item attributes.
*
* Refer to the HID specification for details on each flag's meaning when applied to an IN, OUT or FEATURE item.
* HID report item constants for report item attributes. Refer to the HID specification for
* details on each flag's meaning when applied to an IN, OUT or FEATURE item.
*/
/** \ingroup Group_HIDParser
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Host mode driver for the library USB MIDI Class driver.
*
* Host mode driver for the library USB MIDI Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/MIDI.h.
*/
......@@ -67,7 +69,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
/** \brief MIDI Class Host Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the MIDI class driver functions as the MIDIInterfaceInfo parameter. This
* stores each MIDI interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Host mode driver for the library USB Mass Storage Class driver.
*
* Host mode driver for the library USB Mass Storage Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h.
*/
......@@ -71,7 +73,9 @@
#define MS_ERROR_LOGICAL_CMD_FAILED 0x80
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
/** \brief Mass Storage Class Host Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the Mass Storage class driver functions as the MSInterfaceInfo parameter. This
* stores each Mass Storage interface's configuration and state information.
*/
......@@ -105,7 +109,9 @@
*/
} USB_ClassInfo_MS_Host_t;
/** SCSI capacity structure, to hold the total capacity of the device in both the number
/** \brief SCSI Device LUN Capacity Structure.
*
* SCSI capacity structure, to hold the total capacity of the device in both the number
* of blocks in the current LUN, and the size of each block. This structure is filled by
* the device when the MassStore_ReadCapacity() function is called.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Host mode driver for the library USB Printer Class driver.
*
* Host mode driver for the library USB Printer Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/Printer.h.
*/
......@@ -67,7 +69,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
/** \brief Printer Class Host Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the Printer class driver functions as the PRNTInterfaceInfo parameter. This
* stores each Printer interface's configuration and state information.
*/
......
......@@ -31,6 +31,8 @@
/** \file
* \brief Host mode driver for the library USB RNDIS Class driver.
*
* Host mode driver for the library USB RNDIS Class driver.
*
* \note This file should not be included directly. It is automatically included as needed by the class driver
* dispatch header located in LUFA/Drivers/USB/Class/RNDIS.h.
*/
......@@ -71,7 +73,9 @@
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
/** \brief RNDIS Class Host Mode Configuration and State Structure.
*
* Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the RNDIS class driver functions as the RNDISInterfaceInfo parameter. This
* stores each RNDIS interface's configuration and state information.
*/
......
Supports Markdown
0% or .
You a