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) ...@@ -207,7 +207,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write the line coding data to the control endpoint */ /* 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 */ /* Finalize the stream transfer to send the last packet or clear the host abort */
Endpoint_ClearOUT(); Endpoint_ClearOUT();
...@@ -304,7 +304,7 @@ TASK(CDC1_Task) ...@@ -304,7 +304,7 @@ TASK(CDC1_Task)
Endpoint_SelectEndpoint(CDC1_TX_EPNUM); Endpoint_SelectEndpoint(CDC1_TX_EPNUM);
/* Write the String to the Endpoint */ /* 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 */ /* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN(); Endpoint_ClearIN();
...@@ -351,7 +351,7 @@ TASK(CDC2_Task) ...@@ -351,7 +351,7 @@ TASK(CDC2_Task)
Endpoint_SelectEndpoint(CDC2_TX_EPNUM); Endpoint_SelectEndpoint(CDC2_TX_EPNUM);
/* Write the received data to the endpoint */ /* 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 */ /* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN(); Endpoint_ClearIN();
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
#if defined(__DOXYGEN__) #if defined(__DOXYGEN__)
/** Determines the currently selected dataflash chip. /** 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). * or a DATAFLASH_CHIPn mask (where n is the chip number).
*/ */
static inline uint8_t Dataflash_GetSelectedChip(void); static inline uint8_t Dataflash_GetSelectedChip(void);
......
...@@ -76,10 +76,10 @@ ...@@ -76,10 +76,10 @@
/** ADC channel number for the temperature sensor. */ /** ADC channel number for the temperature sensor. */
#define TEMP_ADC_CHANNEL 0 #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 #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) #define TEMP_MAX_TEMP ((TEMP_TABLE_SIZE - 1) + TEMP_TABLE_OFFSET)
/* Pseudo-Function Macros: */ /* Pseudo-Function Macros: */
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
/* Function Prototypes: */ /* Function Prototypes: */
/** Performs a complete ADC on the temperature sensor channel, and converts the result into a /** 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 * \return Signed temperature in degrees Celsius
*/ */
......
...@@ -175,10 +175,10 @@ ...@@ -175,10 +175,10 @@
/** Moves the cursor to the left the given number of columns. */ /** Moves the cursor to the left the given number of columns. */
#define ESC_CURSOR_BACKWARD(C) ANSI_ESCAPE_SEQUENCE(#C "D") #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") #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") #define ESC_CURSOR_POS_RESTORE ANSI_ESCAPE_SEQUENCE("u")
/** Erases the entire display, returning the cursor to the top left. */ /** Erases the entire display, returning the cursor to the top left. */
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
static inline void ADC_Init(uint8_t Mode); 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 /** 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); static inline void ADC_Off(void);
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
/** Indicates if the current ADC conversion is completed, or still in progress. /** 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 * \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); static inline bool ADC_IsReadingComplete(void);
...@@ -168,8 +168,8 @@ ...@@ -168,8 +168,8 @@
} }
/** Starts the reading of the given channel, but does not wait until the conversion has completed. /** 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 * Once executed, the conversion status can be determined via the \ref ADC_IsReadingComplete() macro and
* the result read via the ADC_GetResult() macro. * the result read via the \ref ADC_GetResult() macro.
* *
* \param MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask * \param MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask
*/ */
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
* for certain descriptors matching unique criteria. * for certain descriptors matching unique criteria.
* *
* Comparator routines are passed in a single pointer named CurrentDescriptor, and should return a value * 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) #define DESCRIPTOR_COMPARATOR(name) uint8_t DCOMP_##name (void* const CurrentDescriptor)
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
* \param CurrConfigLoc Pointer to the current position in the configuration descriptor * \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 * \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: * Usage Example:
* \code * \code
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
#endif #endif
/* Enums: */ /* 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 enum DSearch_Return_ErrorCodes_t
{ {
DESCRIPTOR_SEARCH_Found = 0, /**< Current descriptor matches comparator criteria. */ DESCRIPTOR_SEARCH_Found = 0, /**< Current descriptor matches comparator criteria. */
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
DESCRIPTOR_SEARCH_NotFound = 2, /**< Current descriptor does not match comparator criteria. */ 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 enum DSearch_Comp_Return_ErrorCodes_t
{ {
DESCRIPTOR_SEARCH_COMP_Found = 0, /**< Configuration descriptor now points to descriptor which matches DESCRIPTOR_SEARCH_COMP_Found = 0, /**< Configuration descriptor now points to descriptor which matches
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
/* Public Interface - May be used in end-application: */ /* Public Interface - May be used in end-application: */
/* Enums: */ /* 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 enum HID_ReportItemTypes_t
{ {
REPORT_ITEM_TYPE_In = 0, /**< Indicates that the item is an IN report type. */ REPORT_ITEM_TYPE_In = 0, /**< Indicates that the item is an IN report type. */
...@@ -122,16 +122,16 @@ ...@@ -122,16 +122,16 @@
REPORT_ITEM_TYPE_Feature = 2, /**< Indicates that the item is a FEATURE report type. */ 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 enum HID_Parse_ErrorCodes_t
{ {
HID_PARSE_Successful = 0, /**< Successful parse of the HID report descriptor, no error. */ 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_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_UnexpectedEndCollection = 4, /**< END COLLECTION found without matching COLLECTION item. */
HID_PARSE_InsufficientCollectionPaths = 5, /**< More than HID_MAX_COLLECTIONS collections in the report. */ HID_PARSE_InsufficientCollectionPaths = 5, /**< More than \ref HID_MAX_COLLECTIONS collections in the report. */
HID_PARSE_UsageStackOverflow = 6, /**< More than HID_USAGE_STACK_DEPTH usages listed in a row. */ HID_PARSE_UsageStackOverflow = 6, /**< More than \ref HID_USAGE_STACK_DEPTH usages listed in a row. */
}; };
/* Type Defines: */ /* Type Defines: */
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
*/ */
typedef struct CollectionPath 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. */ HID_Usage_t Usage; /**< Collection usage. */
struct CollectionPath* Parent; /**< Reference to parent collection, or NULL if root collection. */ struct CollectionPath* Parent; /**< Reference to parent collection, or NULL if root collection. */
} HID_CollectionPath_t; } HID_CollectionPath_t;
...@@ -207,22 +207,22 @@ ...@@ -207,22 +207,22 @@
/* Function Prototypes: */ /* Function Prototypes: */
/** Function to process a given HID report returned from an attached device, and store it into a given /** 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 ReportData Buffer containing the device's HID report table
* \param ReportSize Size in bytes of the 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) uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID_ReportInfo_t* const ParserData)
ATTR_NON_NULL_PTR_ARG(1, 3); 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 /** 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 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 * \returns Boolean true if the item to retrieve was located in the given report, false otherwise
*/ */
...@@ -230,14 +230,14 @@ ...@@ -230,14 +230,14 @@
ATTR_NON_NULL_PTR_ARG(1, 2); ATTR_NON_NULL_PTR_ARG(1, 2);
/** Retrieves the given report item's value out of the Value member of the report item's /** 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 * 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). * 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. * 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 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) void USB_SetHIDReportItemInfo(uint8_t* ReportData, const HID_ReportItem_t* ReportItem)
ATTR_NON_NULL_PTR_ARG(1, 2); ATTR_NON_NULL_PTR_ARG(1, 2);
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* multiple places in the user or library code, which may or may not be inside an ISR, thus each handler * 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. * 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 * 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. * function. This is achieved through the use of the GCC compiler's "alias" attribute.
* *
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
/** Indicates that a given module can raise a given event. This is the equivalent of putting the /** 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 * 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. * prototype in the module's header file.
* *
* Usage Examples: * Usage Examples:
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
/** Indicates that a given module handles an event. This is the equivalent of putting the /** 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 * 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. * prototype in the module's header file.
* *
* Usage Examples: * Usage Examples:
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
* which is not always accurate (host may suspend the bus while still connected). If the actual connection state * 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 * 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 * 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. * \see USBTask.h for more information on the USB management task and reducing CPU usage.
*/ */
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
* which is not always accurate (host may suspend the bus while still connected). If the actual connection state * 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 * 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 * 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. * \see USBTask.h for more information on the USB management task and reducing CPU usage.
*/ */
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
/** Event for USB device power on failure. This event fires when the USB interface fails to /** 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. * 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. * located in LowLevel.h.
*/ */
void USB_PowerOnFail(const uint8_t ErrorCode); void USB_PowerOnFail(const uint8_t ErrorCode);
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
/** Event for USB host error. This event fires when a hardware fault has occurred whilst the USB /** Event for USB host error. This event fires when a hardware fault has occurred whilst the USB
* interface is in host mode. * 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. * located in Host.h.
* *
* \note This event only exists on USB AVR models which supports host mode. * \note This event only exists on USB AVR models which supports host mode.
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
/** Event for USB device attachment. This event fires when a the USB interface is in host mode, and /** 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 * 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. * task to reduce CPU consumption.
* *
* \note This event only exists on USB AVR models which supports host mode. * \note This event only exists on USB AVR models which supports host mode.
...@@ -291,19 +291,13 @@ ...@@ -291,19 +291,13 @@
* issued to the device which must be handled appropriately. Due to the strict timing requirements * 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. * 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 * \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation). * LowLevel.h documentation).
* *
* \note Requests should be handled in the same manner as described in the USB 2.0 Specification, * \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 * 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 * request SETUP parameters into the \ref USB_ControlRequest structure which should then be used
* respectively) so that it can correctly determine if it is able to handle the request * by the application to determine how to handle the issued 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.
*/ */
void USB_UnhandledControlPacket(void); void USB_UnhandledControlPacket(void);
...@@ -311,7 +305,7 @@ ...@@ -311,7 +305,7 @@
* selected configuration number while in device mode. This event should be hooked in device * 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. * 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 * \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation). * LowLevel.h documentation).
...@@ -325,7 +319,7 @@ ...@@ -325,7 +319,7 @@
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see * \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation). * 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); void USB_Suspend(void);
...@@ -337,7 +331,7 @@ ...@@ -337,7 +331,7 @@
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see * \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation). * LowLevel.h documentation).
* *
* \see USB_Suspend() event for accompanying Suspend event. * \see \ref USB_Suspend() event for accompanying Suspend event.
*/ */
void USB_WakeUp(void); void USB_WakeUp(void);
...@@ -356,7 +350,7 @@ ...@@ -356,7 +350,7 @@
* and an error occurs which prevents it from operating normally. * 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 * \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 * \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
* LowLevel.h documentation). * LowLevel.h documentation).
......
...@@ -90,85 +90,85 @@ ...@@ -90,85 +90,85 @@
#define VERSION_BCD(x) ((((VERSION_TENS(x) << 4) | VERSION_ONES(x)) << 8) | \ #define VERSION_BCD(x) ((((VERSION_TENS(x) << 4) | VERSION_ONES(x)) << 8) | \
((VERSION_TENTHS(x) << 4) | VERSION_HUNDREDTHS(x))) ((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. * to indicate that the English language is supported by the device in its string descriptors.
*/ */
#define LANGUAGE_ID_ENG 0x0409 #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 * EndpointAddress value to indicate to the host that the endpoint is of the IN direction (i.e, from
* device to host). * device to host).
*/ */
#define ENDPOINT_DESCRIPTOR_DIR_IN 0x80 #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 * EndpointAddress value to indicate to the host that the endpoint is of the OUT direction (i.e, from
* host to device). * host to device).
*/ */
#define ENDPOINT_DESCRIPTOR_DIR_OUT 0x00 #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 * descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power
* from the host's VBUS line. * from the host's VBUS line.
*/ */
#define USB_CONFIG_ATTR_BUSPOWERED 0x80 #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 * descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power
* from the device's own power source. * from the device's own power source.
*/ */
#define USB_CONFIG_ATTR_SELFPOWERED 0xC0 #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 * 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 * remote wakeup feature of the USB standard, allowing a suspended USB device to wake up the host upon
* request. * request.
*/ */
#define USB_CONFIG_ATTR_REMOTEWAKEUP 0xA0 #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. * Attributes value to indicate that the specified endpoint is not synchronized.
* *
* \see The USB specification for more details on the possible Endpoint attributes. * \see The USB specification for more details on the possible Endpoint attributes.
*/ */
#define ENDPOINT_ATTR_NO_SYNC (0 << 2) #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. * Attributes value to indicate that the specified endpoint is asynchronous.
* *
* \see The USB specification for more details on the possible Endpoint attributes. * \see The USB specification for more details on the possible Endpoint attributes.
*/ */
#define ENDPOINT_ATTR_ASYNC (1 << 2) #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. * Attributes value to indicate that the specified endpoint is adaptive.
* *
* \see The USB specification for more details on the possible Endpoint attributes. * \see The USB specification for more details on the possible Endpoint attributes.
*/ */