Commit 9cec85bf authored by Dean Camera's avatar Dean Camera
Browse files

Documentation enhancements to improve documentation cross-references.

parent 6865a7bc
......@@ -207,7 +207,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
Endpoint_ClearSETUP();
/* Write the line coding data to the control endpoint */
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t), Endpoint_MemSpaceCallback_RAM);
/* Finalize the stream transfer to send the last packet or clear the host abort */
Endpoint_ClearOUT();
......@@ -304,7 +304,7 @@ TASK(CDC1_Task)
Endpoint_SelectEndpoint(CDC1_TX_EPNUM);
/* Write the String to the Endpoint */
Endpoint_Write_Stream_LE(ReportString, strlen(ReportString));
Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), Endpoint_MemSpaceCallback_RAM);
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN();
......@@ -351,7 +351,7 @@ TASK(CDC2_Task)
Endpoint_SelectEndpoint(CDC2_TX_EPNUM);
/* Write the received data to the endpoint */
Endpoint_Write_Stream_LE(&Buffer, DataLength);
Endpoint_Write_Stream_LE(&Buffer, DataLength, Endpoint_MemSpaceCallback_RAM);
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN();
......
......@@ -79,7 +79,7 @@
#if defined(__DOXYGEN__)
/** Determines the currently selected dataflash chip.
*
* \return Mask of the currently selected Dataflash chip, either DATAFLASH_NO_CHIP if no chip is selected
* \return Mask of the currently selected Dataflash chip, either \ref DATAFLASH_NO_CHIP if no chip is selected
* or a DATAFLASH_CHIPn mask (where n is the chip number).
*/
static inline uint8_t Dataflash_GetSelectedChip(void);
......
......@@ -76,10 +76,10 @@
/** ADC channel number for the temperature sensor. */
#define TEMP_ADC_CHANNEL 0
/** Minimum returnable temperature from the Temperature_GetTemperature() function. */
/** Minimum returnable temperature from the \ref Temperature_GetTemperature() function. */
#define TEMP_MIN_TEMP TEMP_TABLE_OFFSET
/** Maximum returnable temperature from the Temperature_GetTemperature() function. */
/** Maximum returnable temperature from the \ref Temperature_GetTemperature() function. */
#define TEMP_MAX_TEMP ((TEMP_TABLE_SIZE - 1) + TEMP_TABLE_OFFSET)
/* Pseudo-Function Macros: */
......@@ -97,7 +97,7 @@
/* Function Prototypes: */
/** Performs a complete ADC on the temperature sensor channel, and converts the result into a
* valid temperature between TEMP_MIN_TEMP and TEMP_MAX_TEMP in degrees Celsius.
* valid temperature between \ref TEMP_MIN_TEMP and \ref TEMP_MAX_TEMP in degrees Celsius.
*
* \return Signed temperature in degrees Celsius
*/
......
......@@ -175,10 +175,10 @@
/** Moves the cursor to the left the given number of columns. */
#define ESC_CURSOR_BACKWARD(C) ANSI_ESCAPE_SEQUENCE(#C "D")
/** Saves the current cursor position so that it may be restored with ESC_CURSOR_POS_RESTORE. */
/** Saves the current cursor position so that it may be restored with \ref ESC_CURSOR_POS_RESTORE. */
#define ESC_CURSOR_POS_SAVE ANSI_ESCAPE_SEQUENCE("s")
/** Restores the cursor position to the last position saved with ESC_CURSOR_POS_SAVE. */
/** Restores the cursor position to the last position saved with \ref ESC_CURSOR_POS_SAVE. */
#define ESC_CURSOR_POS_RESTORE ANSI_ESCAPE_SEQUENCE("u")
/** Erases the entire display, returning the cursor to the top left. */
......
......@@ -120,7 +120,7 @@
static inline void ADC_Init(uint8_t Mode);
/** Turns off the ADC. If this is called, any further ADC operations will require a call to
* ADC_Init() before the ADC can be used again.
* \ref ADC_Init() before the ADC can be used again.
*/
static inline void ADC_Off(void);
......@@ -133,7 +133,7 @@
/** Indicates if the current ADC conversion is completed, or still in progress.
*
* \return Boolean false if the reading is still taking place, or true if the conversion is
* complete and ready to be read out with ADC_GetResult()
* complete and ready to be read out with \ref ADC_GetResult()
*/
static inline bool ADC_IsReadingComplete(void);
......@@ -168,8 +168,8 @@
}
/** Starts the reading of the given channel, but does not wait until the conversion has completed.
* Once executed, the conversion status can be determined via the ADC_IsReadingComplete() macro and
* the result read via the ADC_GetResult() macro.
* Once executed, the conversion status can be determined via the \ref ADC_IsReadingComplete() macro and
* the result read via the \ref ADC_GetResult() macro.
*
* \param MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask
*/
......
......@@ -118,7 +118,7 @@
* for certain descriptors matching unique criteria.
*
* Comparator routines are passed in a single pointer named CurrentDescriptor, and should return a value
* of a member of the DSearch_Return_ErrorCodes_t enum.
* of a member of the \ref DSearch_Return_ErrorCodes_t enum.
*/
#define DESCRIPTOR_COMPARATOR(name) uint8_t DCOMP_##name (void* const CurrentDescriptor)
......@@ -137,7 +137,7 @@
* \param CurrConfigLoc Pointer to the current position in the configuration descriptor
* \param ComparatorRoutine Name of the comparator search function to use on the configuration descriptor
*
* \return Value of one of the members of the DSearch_Comp_Return_ErrorCodes_t enum
* \return Value of one of the members of the \ref DSearch_Comp_Return_ErrorCodes_t enum
*
* Usage Example:
* \code
......@@ -166,7 +166,7 @@
#endif
/* Enums: */
/** Enum for return values of a descriptor comparator made with DESCRIPTOR_COMPARATOR. */
/** Enum for return values of a descriptor comparator made with \ref DESCRIPTOR_COMPARATOR. */
enum DSearch_Return_ErrorCodes_t
{
DESCRIPTOR_SEARCH_Found = 0, /**< Current descriptor matches comparator criteria. */
......@@ -174,7 +174,7 @@
DESCRIPTOR_SEARCH_NotFound = 2, /**< Current descriptor does not match comparator criteria. */
};
/** Enum for return values of USB_GetNextDescriptorComp(). */
/** Enum for return values of \ref USB_GetNextDescriptorComp(). */
enum DSearch_Comp_Return_ErrorCodes_t
{
DESCRIPTOR_SEARCH_COMP_Found = 0, /**< Configuration descriptor now points to descriptor which matches
......
......@@ -114,7 +114,7 @@
/* Public Interface - May be used in end-application: */
/* Enums: */
/** Enum for indicating what type of report item an entry in a HID_ReportInfo_t ReportItem array is */
/** Enum for indicating what type of report item an entry in a \ref HID_ReportInfo_t ReportItem array is */
enum HID_ReportItemTypes_t
{
REPORT_ITEM_TYPE_In = 0, /**< Indicates that the item is an IN report type. */
......@@ -122,16 +122,16 @@
REPORT_ITEM_TYPE_Feature = 2, /**< Indicates that the item is a FEATURE report type. */
};
/** Enum for the possible error codes in the return value of the ProcessHIDReport() function */
/** Enum for the possible error codes in the return value of the \ref USB_ProcessHIDReport() function */
enum HID_Parse_ErrorCodes_t
{
HID_PARSE_Successful = 0, /**< Successful parse of the HID report descriptor, no error. */
HID_PARSE_HIDStackOverflow = 1, /**< More than HID_STATETABLE_STACK_DEPTH nested PUSHes in the report. */
HID_PARSE_HIDStackOverflow = 1, /**< More than \ref HID_STATETABLE_STACK_DEPTH nested PUSHes in the report. */
HID_PARSE_HIDStackUnderflow = 2, /**< A POP was found when the state table stack was empty. */
HID_PARSE_InsufficientReportItems = 3, /**< More than HID_MAX_REPORTITEMS report items in the report. */
HID_PARSE_InsufficientReportItems = 3, /**< More than \ref HID_MAX_REPORTITEMS report items in the report. */
HID_PARSE_UnexpectedEndCollection = 4, /**< END COLLECTION found without matching COLLECTION item. */
HID_PARSE_InsufficientCollectionPaths = 5, /**< More than HID_MAX_COLLECTIONS collections in the report. */
HID_PARSE_UsageStackOverflow = 6, /**< More than HID_USAGE_STACK_DEPTH usages listed in a row. */
HID_PARSE_InsufficientCollectionPaths = 5, /**< More than \ref HID_MAX_COLLECTIONS collections in the report. */
HID_PARSE_UsageStackOverflow = 6, /**< More than \ref HID_USAGE_STACK_DEPTH usages listed in a row. */
};
/* Type Defines: */
......@@ -162,7 +162,7 @@
*/
typedef struct CollectionPath
{
uint8_t Type; /**< Collection type (for example "Generic Desktop"). */
uint8_t Type; /**< Collection type (e.g. "Generic Desktop"). */
HID_Usage_t Usage; /**< Collection usage. */
struct CollectionPath* Parent; /**< Reference to parent collection, or NULL if root collection. */
} HID_CollectionPath_t;
......@@ -207,22 +207,22 @@
/* Function Prototypes: */
/** Function to process a given HID report returned from an attached device, and store it into a given
* HID_ReportInfo_t structure.
* \ref HID_ReportInfo_t structure.
*
* \param ReportData Buffer containing the device's HID report table
* \param ReportSize Size in bytes of the HID report table
* \param ParserData Pointer to a HID_ReportInfo_t instance for the parser output
* \param ParserData Pointer to a \ref HID_ReportInfo_t instance for the parser output
*
* \return A value in the HID_Parse_ErrorCodes_t enum
* \return A value in the \ref HID_Parse_ErrorCodes_t enum
*/
uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID_ReportInfo_t* const ParserData)
ATTR_NON_NULL_PTR_ARG(1, 3);
/** Extracts the given report item's value out of the given HID report and places it into the Value
* member of the report item's HID_ReportItem_t structure.
* member of the report item's \ref HID_ReportItem_t structure.
*
* \param ReportData Buffer containing an IN or FEATURE report from an attached device
* \param ReportItem Pointer to the report item of interest in a HID_ReportInfo_t ReportItem array
* \param ReportItem Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array
*
* \returns Boolean true if the item to retrieve was located in the given report, false otherwise
*/
......@@ -230,14 +230,14 @@
ATTR_NON_NULL_PTR_ARG(1, 2);
/** Retrieves the given report item's value out of the Value member of the report item's
* HID_ReportItem_t structure and places it into the correct position in the HID report
* \ref HID_ReportItem_t structure and places it into the correct position in the HID report
* buffer. The report buffer is assumed to have the appropriate bits cleared before calling
* this function (i.e., the buffer should be explicitly cleared before report values are added).
*
* If the device has multiple HID reports, the report ID is set to the report ID of the given item.
*
* \param ReportData Buffer holding the current OUT report data
* \param ReportItem Pointer to the report item of interest in a HID_ReportInfo_t ReportItem array
* \param ReportItem Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array
*/
void USB_SetHIDReportItemInfo(uint8_t* ReportData, const HID_ReportItem_t* ReportItem)
ATTR_NON_NULL_PTR_ARG(1, 2);
......
......@@ -36,7 +36,7 @@
* multiple places in the user or library code, which may or may not be inside an ISR, thus each handler
* should be written to be as small and fast as possible to prevent possible problems.
*
* Events can be hooked by the user application using the EVENT_HANDLER() and HANDLES_EVENT() macros. If an
* Events can be hooked by the user application using the \ref EVENT_HANDLER() and \ref HANDLES_EVENT() macros. If an
* event with no associated handler is fired within the library, it by default fires an internal empty stub
* function. This is achieved through the use of the GCC compiler's "alias" attribute.
*
......@@ -82,7 +82,7 @@
/** Indicates that a given module can raise a given event. This is the equivalent of putting the
* event function's prototype into the module, but in a cleaner way. Each event which may be
* fired via the RAISE_EVENT macro in the module should have an accompanying RAISES_EVENT
* fired via the \ref RAISE_EVENT macro in the module should have an accompanying \ref RAISES_EVENT
* prototype in the module's header file.
*
* Usage Examples:
......@@ -122,7 +122,7 @@
/** Indicates that a given module handles an event. This is the equivalent of putting the
* event function's prototype into the module, but in a cleaner way. Each event which may be
* handled via the EVENT_HANDLER macro in the module should have an accompanying HANDLES_EVENT
* handled via the \ref EVENT_HANDLER macro in the module should have an accompanying \ref HANDLES_EVENT
* prototype in the module's header file.
*
* Usage Examples:
......@@ -178,7 +178,7 @@
* which is not always accurate (host may suspend the bus while still connected). If the actual connection state
* needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by
* passing the NO_LIMITED_CONTROLLER_CONNECT token to the compiler via the -D switch at compile time. The connection
* and disconnection events may be manually fired by RAISE_EVENT(), and the USB_IsConnected global changed manually.
* and disconnection events may be manually fired by \ref RAISE_EVENT(), and the \ref USB_IsConnected global changed manually.
*
* \see USBTask.h for more information on the USB management task and reducing CPU usage.
*/
......@@ -196,7 +196,7 @@
* which is not always accurate (host may suspend the bus while still connected). If the actual connection state
* needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by
* passing the NO_LIMITED_CONTROLLER_CONNECT token to the compiler via the -D switch at compile time. The connection
* and disconnection events may be manually fired by RAISE_EVENT(), and the USB_IsConnected global changed manually.
* and disconnection events may be manually fired by \ref RAISE_EVENT(), and the \ref USB_IsConnected global changed manually.
*
* \see USBTask.h for more information on the USB management task and reducing CPU usage.
*/
......@@ -205,7 +205,7 @@
/** Event for USB device power on failure. This event fires when the USB interface fails to
* initialize correctly due to a hardware or software fault.
*
* \param ErrorCode Error code indicating the failure reason, a value in USB_PowerOnErrorCodes_t
* \param ErrorCode Error code indicating the failure reason, a value in \ref USB_PowerOnErrorCodes_t
* located in LowLevel.h.
*/
void USB_PowerOnFail(const uint8_t ErrorCode);
......@@ -224,7 +224,7 @@
/** Event for USB host error. This event fires when a hardware fault has occurred whilst the USB
* interface is in host mode.
*
* \param ErrorCode Error code indicating the failure reason, a value in USB_Host_ErrorCodes_t
* \param ErrorCode Error code indicating the failure reason, a value in \ref USB_Host_ErrorCodes_t
* located in Host.h.
*
* \note This event only exists on USB AVR models which supports host mode.
......@@ -236,7 +236,7 @@
/** Event for USB device attachment. This event fires when a the USB interface is in host mode, and
* a USB device has been connected to the USB interface. This is interrupt driven, thus fires before
* the standard USB_DeviceConnect event and so can be used to programmatically start the USB management
* the standard \ref USB_Connect event and so can be used to programmatically start the USB management
* task to reduce CPU consumption.
*
* \note This event only exists on USB AVR models which supports host mode.
......@@ -291,19 +291,13 @@
* issued to the device which must be handled appropriately. Due to the strict timing requirements
* on control transfers, interrupts are disabled during control request processing.
*
* \param bRequest Request value, indicating what command the host has issued.
* \param bmRequestType Mask indicating the request data direction (if any), type and recipient.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation).
*
* \note Requests should be handled in the same manner as described in the USB 2.0 Specification,
* or appropriate class' specification. In all instances, the library has already read the
* request bmRequestType and bRequest values out (into the Request and RequestType parameters
* respectively) so that it can correctly determine if it is able to handle the request
* internally, or hand off the request to the user application via this event. Other request
* parameters (wValue, wIndex, wLength, and Data) remain in the control endpoint bank until
* read out by the user application for processing.
* or appropriate class specification. In all instances, the library has already read the
* request SETUP parameters into the \ref USB_ControlRequest structure which should then be used
* by the application to determine how to handle the issued request.
*/
void USB_UnhandledControlPacket(void);
......@@ -311,7 +305,7 @@
* selected configuration number while in device mode. This event should be hooked in device
* applications to create the endpoints and configure the device for the selected configuration.
*
* This event fires after the value of USB_ConfigurationNumber has been changed.
* This event fires after the value of \ref USB_ConfigurationNumber has been changed.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation).
......@@ -325,7 +319,7 @@
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation).
*
* \see USB_WakeUp() event for accompanying Wake Up event.
* \see \ref USB_WakeUp() event for accompanying Wake Up event.
*/
void USB_Suspend(void);
......@@ -337,7 +331,7 @@
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation).
*
* \see USB_Suspend() event for accompanying Suspend event.
* \see \ref USB_Suspend() event for accompanying Suspend event.
*/
void USB_WakeUp(void);
......@@ -356,7 +350,7 @@
* and an error occurs which prevents it from operating normally.
*
* \param ErrorCode Error code indicating the source of the error. One of the values in the
* USB_Device_ErrorCodes_t enum located in Device.h.
* \ref USB_Device_ErrorCodes_t enum located in Device.h.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation).
......
......@@ -90,85 +90,85 @@
#define VERSION_BCD(x) ((((VERSION_TENS(x) << 4) | VERSION_ONES(x)) << 8) | \
((VERSION_TENTHS(x) << 4) | VERSION_HUNDREDTHS(x)))
/** String language ID for the English language. Should be used in USB_Descriptor_Language_t descriptors
/** String language ID for the English language. Should be used in \ref USB_Descriptor_String_t descriptors
* to indicate that the English language is supported by the device in its string descriptors.
*/
#define LANGUAGE_ID_ENG 0x0409
/** Can be masked with an endpoint address for a USB_Descriptor_Endpoint_t endpoint descriptor's
/** 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).
*/
#define ENDPOINT_DESCRIPTOR_DIR_IN 0x80
/** Can be masked with an endpoint address for a USB_Descriptor_Endpoint_t endpoint descriptor's
/** 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 OUT direction (i.e, from
* host to device).
*/
#define ENDPOINT_DESCRIPTOR_DIR_OUT 0x00
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
/** 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.
*/
#define USB_CONFIG_ATTR_BUSPOWERED 0x80
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
/** 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 device's own power source.
*/
#define USB_CONFIG_ATTR_SELFPOWERED 0xC0
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
/** 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 supports the
* remote wakeup feature of the USB standard, allowing a suspended USB device to wake up the host upon
* request.
*/
#define USB_CONFIG_ATTR_REMOTEWAKEUP 0xA0
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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.
*
* \see The USB specification for more details on the possible Endpoint attributes.
*/
#define ENDPOINT_ATTR_NO_SYNC (0 << 2)
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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 asynchronous.
*
* \see The USB specification for more details on the possible Endpoint attributes.
*/
#define ENDPOINT_ATTR_ASYNC (1 << 2)
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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 adaptive.
*
* \see The USB specification for more details on the possible Endpoint attributes.
*/
#define ENDPOINT_ATTR_ADAPTIVE (2 << 2)
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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 synchronized.
*
* \see The USB specification for more details on the possible Endpoint attributes.
*/
#define ENDPOINT_ATTR_SYNC (3 << 2)
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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.
*
* \see The USB specification for more details on the possible Endpoint usage attributes.
*/
#define ENDPOINT_USAGE_DATA (0 << 4)
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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 feedback.
*
* \see The USB specification for more details on the possible Endpoint usage attributes.
*/
#define ENDPOINT_USAGE_FEEDBACK (1 << 4)
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
/** 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 implicit feedback.
*
* \see The USB specification for more details on the possible Endpoint usage attributes.
......@@ -180,7 +180,7 @@
/* Events: */
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
/** This module raises the Device Error event while in device mode, if the USB_GetDescriptor()
/** This module raises the Device Error event while in device mode, if the \ref USB_GetDescriptor()
* routine is not hooked in the user application to properly return descriptors to the library.
*
* \see Events.h for more information on this event.
......@@ -215,7 +215,7 @@
{
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)
uint8_t Size; /**< Size of the descriptor, in bytes. */
uint8_t Type; /**< Type of the descriptor, either a value in DescriptorTypes_t or a value
uint8_t Type; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
* given by the specific class.
*/
#else
......@@ -251,7 +251,7 @@
* host will request this string via a separate
* control request for the string descriptor.
*
* \note If no string supplied, use NO_DESCRIPTOR.
* \note If no string supplied, use \ref NO_DESCRIPTOR.
*/
uint8_t ProductStrIndex; /**< String index for the product name/details.
*
......@@ -309,7 +309,7 @@
*/
uint8_t MaxPowerConsumption; /**< Maximum power consumption of the device while in the
* current configuration, calculated by the USB_CONFIG_POWER_MA()
* current configuration, calculated by the \ref USB_CONFIG_POWER_MA()
* macro.
*/
#else
......@@ -364,7 +364,7 @@
#endif
} USB_Descriptor_Interface_t;
/** Type define for a standard interface association descriptor.
/** Type define for a standard Interface Association descriptor.
*
* This descriptor has been added as a supplement to the USB2.0 standard, in the ECN located at
* <a>http://www.usb.org/developers/docs/InterfaceAssociationDescriptor_ecn.pdf</a>. It allows compound
......@@ -442,7 +442,7 @@
} USB_Descriptor_Endpoint_t;
/** Type define for a standard string descriptor. Unlike other standard descriptors, the length
* of the descriptor for placement in the descriptor header must be determined by the USB_STRING_LEN()
* of the descriptor for placement in the descriptor header must be determined by the \ref USB_STRING_LEN()
* macro rather than by the size of the descriptor structure, as the length is not fixed.
*
* This structure should also be used for string index 0, which contains the supported language IDs for
......@@ -479,7 +479,7 @@
/* Function Prototypes: */
/** Function to retrieve a given descriptor's size and memory location from the given descriptor type value,
* index and language ID. This function MUST be overridden in the user application (added with full, identical
* prototype and name except for the ATTR_WEAK attribute) so that the library can call it to retrieve descriptor
* prototype and name except for the \ref ATTR_WEAK attribute) so that the library can call it to retrieve descriptor
* data.
*
* \param wValue The type of the descriptor to retrieve in the upper byte, and the index in the
......@@ -490,7 +490,7 @@
* otherwise zero for standard descriptors, or as defined in a class-specific
* standards.
* \param DescriptorAddress Pointer to the descriptor in memory. This should be set by the routine to
* the location of the descriptor, found by the DESCRIPTOR_ADDRESS macro.
* the location of the descriptor, found by the \ref DESCRIPTOR_ADDRESS() macro.
*
* \note By default, the library expects all descriptors to be located in flash memory via the PROGMEM attribute.
* If descriptors should be located in RAM or EEPROM instead (to speed up access in the case of RAM, or to
......@@ -498,7 +498,7 @@
* USE_EEPROM_DESCRIPTORS tokens may be defined in the project makefile and passed to the compiler by the -D
* switch.
*
* \return Size in bytes of the descriptor if it exists, zero or NO_DESCRIPTOR otherwise
* \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise
*/
uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
ATTR_WARN_UNUSED_RESULT ATTR_WEAK ATTR_NON_NULL_PTR_ARG(3);
......
......@@ -66,58 +66,58 @@
/** Request data direction mask, indicating that the request data will flow from host to device.
*
* \see CONTROL_REQTYPE_DIRECTION macro.
* \see \ref CONTROL_REQTYPE_DIRECTION macro.
*/
#define REQDIR_HOSTTODEVICE (0 << 7)
/** Request data direction mask, indicating that the request data will flow from device to host.
*
* \see CONTROL_REQTYPE_DIRECTION macro.
* \see \ref CONTROL_REQTYPE_DIRECTION macro.
*/
#define REQDIR_DEVICETOHOST (1 << 7)
/** Request type mask, indicating that the request is a standard request.
*
* \see CONTROL_REQTYPE_TYPE macro.
* \see \ref CONTROL_REQTYPE_TYPE macro.
*/
#define REQTYPE_STANDARD (0 << 5)
/** Request type mask, indicating that the request is a class-specific request.
*
* \see CONTROL_REQTYPE_TYPE macro.
* \see \ref CONTROL_REQTYPE_TYPE macro.
*/
#define REQTYPE_CLASS (1 << 5)
/** Request type mask, indicating that the request is a vendor specific request.
*
* \see CONTROL_REQTYPE_TYPE macro.
* \see \ref CONTROL_REQTYPE_TYPE macro.
*/
#define REQTYPE_VENDOR (2 << 5)
/** Request recipient mask, indicating that the request is to be issued to the device as a whole.
*
* \see CONTROL_REQTYPE_RECIPIENT macro.
* \see \ref CONTROL_REQTYPE_RECIPIENT macro.
*/
#define REQREC_DEVICE (0 << 0)
/** Request recipient mask, indicating that the request is to be issued to an interface in the
* currently selected configuration.
*
* \see CONTROL_REQTYPE_RECIPIENT macro.
* \see \ref CONTROL_REQTYPE_RECIPIENT macro.
*/
#define REQREC_INTERFACE (1 << 0)
/** Request recipient mask, indicating that the request is to be issued to an endpoint in the
* currently selected configuration.
*
* \see CONTROL_REQTYPE_RECIPIENT macro.
* \see \ref CONTROL_REQTYPE_RECIPIENT macro.
*/
#define REQREC_ENDPOINT (2 << 0)
/** Request recipient mask, indicating that the request is to be issued to an unspecified element
* in the currently selected configuration.
*
* \see CONTROL_REQTYPE_RECIPIENT macro.
* \see \ref CONTROL_REQTYPE_RECIPIENT macro.
*/
#define REQREC_OTHER (3 << 0)
......@@ -151,7 +151,7 @@
/* Enums: */
/** Enumeration for the various standard request commands. These commands are applicable when the
* request type is REQTYPE_STANDARD (with the exception of REQ_GetDescriptor, which is always
* request type is \ref REQTYPE_STANDARD (with the exception of \ref REQ_GetDescriptor, which is always
* handled regardless of the request type value).
*
* \see Chapter 9 of the USB 2.0 Specification.
......@@ -160,41 +160,41 @@
{
REQ_GetStatus = 0, /**< Implemented in the library for device, endpoint and interface
* recipients. Passed to the user application for other recipients
* via the USB_UnhandledControlPacket() event when received in
* via the \ref USB_UnhandledControlPacket() event when received in
* device mode. */
REQ_ClearFeature = 1, /**< Implemented in the library for device, endpoint and interface
* recipients. Passed to the user application for other recipients
* via the USB_UnhandledControlPacket() event when received in
* via the \ref USB_UnhandledControlPacket() event when received in
* device mode. */
REQ_SetFeature = 3, /**< Implemented in the library for device, endpoint and interface
* recipients. Passed to the user application for other recipients
* via the USB_UnhandledControlPacket() event when received in
* via the \ref USB_UnhandledControlPacket() event when received in
* device mode. */
REQ_SetAddress = 5, /**< Implemented in the library for the device recipient. Passed
* to the user application for other recipients via the
* USB_UnhandledControlPacket() event when received in
* \ref USB_UnhandledControlPacket() event when received in
* device mode. */
REQ_GetDescriptor = 6, /**< Implemented in the library for all recipients and all request
* types. */
REQ_SetDescriptor = 7, /**< Not implemented in the library, passed to the user application
* via the USB_UnhandledControlPacket() event when received in
* via the \ref USB_UnhandledControlPacket() event when received in
* device mode. */
REQ_GetConfiguration = 8, /**< Implemented in the library for the device recipient. Passed
* to the user application for other recipients via the
* USB_UnhandledControlPacket() event when received in
* \ref USB_UnhandledControlPacket() event when received in
* device mode. */
REQ_SetConfiguration = 9, /**< Implemented in the library for the device recipient. Passed
* to the user application for other recipients via the