aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel')
-rw-r--r--LUFA/Drivers/USB/HighLevel/Events.h26
-rw-r--r--LUFA/Drivers/USB/HighLevel/StdDescriptors.h55
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBInterrupt.h18
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBTask.c4
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBTask.h14
5 files changed, 55 insertions, 62 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/HighLevel/Events.h
index 4624e5bce..36e16c98b 100644
--- a/LUFA/Drivers/USB/HighLevel/Events.h
+++ b/LUFA/Drivers/USB/HighLevel/Events.h
@@ -219,7 +219,7 @@
* \note This event only exists on USB AVR models which support dual role modes.
*
* \note This event does not exist if the USB_DEVICE_ONLY or USB_HOST_ONLY tokens have been supplied
- * to the compiler (see LowLevel.h documentation).
+ * to the compiler (see \ref Group_USBManagement documentation).
*/
void USB_UIDChange(void);
@@ -232,7 +232,7 @@
* \note This event only exists on USB AVR models which supports host mode.
*
* \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*/
void USB_HostError(const uint8_t ErrorCode);
@@ -244,9 +244,9 @@
* \note This event only exists on USB AVR models which supports host mode.
*
* \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*
- * \see USBTask.h for more information on the USB management task and reducing CPU usage.
+ * \see \ref TASK(USB_USBTask) for more information on the USB management task and reducing CPU usage.
*/
void USB_DeviceAttached(void);
@@ -257,9 +257,9 @@
* \note This event only exists on USB AVR models which supports host mode.
*
* \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*
- * \see USBTask.h for more information on the USB management task and reducing CPU usage.
+ * \see \ref TASK(USB_USBTask) for more information on the USB management task and reducing CPU usage.
*/
void USB_DeviceUnattached(void);
@@ -276,7 +276,7 @@
* \note This event only exists on USB AVR models which supports host mode.
*
* \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*/
void USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
@@ -294,7 +294,7 @@
* on control transfers, interrupts are disabled during control request processing.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement 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
@@ -310,7 +310,7 @@
* 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).
+ * \ref Group_USBManagement documentation).
*/
void USB_ConfigurationChanged(void);
@@ -319,7 +319,7 @@
* the device over to a low power state until the host wakes up the device.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*
* \see \ref USB_WakeUp() event for accompanying Wake Up event.
*/
@@ -331,7 +331,7 @@
* mode.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*
* \see \ref USB_Suspend() event for accompanying Suspend event.
*/
@@ -344,7 +344,7 @@
* disabled.
*
* \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
- * LowLevel.h documentation).
+ * \ref Group_USBManagement documentation).
*/
void USB_Reset(void);
@@ -355,7 +355,7 @@
* \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).
+ * \ref Group_USBManagement documentation).
*/
void USB_DeviceError(const uint8_t ErrorCode);
#endif
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
index caa0fb046..2de50584b 100644
--- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
+++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
@@ -76,12 +76,12 @@
#define NO_DESCRIPTOR 0
/** Macro to calculate the power value for the device descriptor, from a given number of milliamps. */
- #define USB_CONFIG_POWER_MA(x) (x >> 1)
+ #define USB_CONFIG_POWER_MA(mA) (mA >> 1)
/** Macro to calculate the Unicode length of a string with a given number of Unicode characters.
* Should be used in string descriptor's headers for giving the string descriptor's byte length.
*/
- #define USB_STRING_LEN(x) (sizeof(USB_Descriptor_Header_t) + (x << 1))
+ #define USB_STRING_LEN(str) (sizeof(USB_Descriptor_Header_t) + (str << 1))
/** Macro to encode a given four digit floating point version number (e.g. 01.23) into Binary Coded
* Decimal format for descriptor fields requiring BCD encoding, such as the USB version number in the
@@ -183,7 +183,7 @@
/** 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.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_DeviceError);
#endif
@@ -206,10 +206,9 @@
/* Type Defines: */
/** Type define for all descriptor's header, indicating the descriptor's length and type.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
@@ -226,10 +225,9 @@
/** Type define for a standard device descriptor.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
@@ -286,10 +284,9 @@
/** Type define for a standard configuration descriptor.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
@@ -326,10 +323,9 @@
/** Type define for a standard interface descriptor.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
@@ -372,10 +368,9 @@
* together at the point of enumeration, loading one generic driver for all the interfaces in the single
* function. Read the ECN for more information.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
@@ -406,10 +401,9 @@
/** Type define for a standard endpoint descriptor.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
@@ -448,10 +442,9 @@
* This structure should also be used for string index 0, which contains the supported language IDs for
* the device as an array.
*
- * \note The non-standard structure element names are documented here - see the StdDescriptors.h file
- * documentation for more information on the two descriptor naming schemes. If the
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements with names
- * identical to those listed in the USB standard.
+ * \note The non-standard structure element names are documented here. If the
+ * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements
+ * with names identical to those listed in the USB standard.
*/
typedef struct
{
diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.h b/LUFA/Drivers/USB/HighLevel/USBInterrupt.h
index ee13f2554..9a1604703 100644
--- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.h
+++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.h
@@ -118,7 +118,7 @@
*
* \note Not all USB AVR models support VBUS interrupts; this event only exists on supported AVRs.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_VBUSChange);
@@ -126,7 +126,7 @@
*
* \note Not all USB AVR models support VBUS interrupts; this event only exists on supported AVRs.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_VBUSConnect);
@@ -134,7 +134,7 @@
*
* \note Not all USB AVR models support VBUS interrupts; this event only exists on supported AVRs.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_VBUSDisconnect);
#endif
@@ -143,21 +143,21 @@
/** This module raises the Suspended event when the host suspends the USB interface of the AVR
* whilst running in device mode.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_Suspend);
/** This module raises the Wake Up event when the host resumes the USB interface of the AVR
* whilst running in device mode.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_WakeUp);
/** This module raises the USB Reset event when the host resets the USB interface of the AVR
* whilst running in device mode.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_Reset);
#endif
@@ -168,7 +168,7 @@
*
* \note Not all USB AVR models support host mode; this event only exists on supported AVRs.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_HostError);
@@ -177,7 +177,7 @@
*
* \note Not all USB AVR models support host mode; this event only exists on supported AVRs.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_DeviceUnattached);
#endif
@@ -188,7 +188,7 @@
* \note Not all USB AVR models support host mode and thus the UID pin; this event only exists on
* supported AVRs.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_UIDChange);
#endif
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.c b/LUFA/Drivers/USB/HighLevel/USBTask.c
index aa04c56ba..738dc1592 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.c
+++ b/LUFA/Drivers/USB/HighLevel/USBTask.c
@@ -157,7 +157,7 @@ static void USB_HostTask(void)
break;
case HOST_STATE_Powered:
Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
- PIPE_TOKEN_SETUP, PIPE_CONTROLPIPE,
+ PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
PIPE_CONTROLPIPE_DEFAULT_SIZE, PIPE_BANK_SINGLE);
if (!(Pipe_IsConfigured()))
@@ -203,7 +203,7 @@ static void USB_HostTask(void)
Pipe_ResetPipe(PIPE_CONTROLPIPE);
Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
- PIPE_TOKEN_SETUP, PIPE_CONTROLPIPE,
+ PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
USB_ControlPipeSize, PIPE_BANK_SINGLE);
if (!(Pipe_IsConfigured()))
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/HighLevel/USBTask.h
index 918fa5e31..1718ed691 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.h
+++ b/LUFA/Drivers/USB/HighLevel/USBTask.h
@@ -127,28 +127,28 @@
/** This module raises the \ref USB_Connect event when a USB device has been connected whilst in host
* mode, but not yet enumerated.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_Connect);
/** This module raises the \ref USB_DeviceAttached event when in host mode, and a device is attached
* to the AVR's USB interface.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_DeviceAttached);
/** This module raises the \ref USB_DeviceUnattached event when in host mode, and a device is removed
* from the AVR's USB interface.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_DeviceUnattached);
/** This module raises the \ref USB_DeviceEnumerationFailed event when in host mode, and an
* attached USB device has failed to successfully enumerated.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_DeviceEnumerationFailed);
@@ -156,14 +156,14 @@
* attached USB device has been successfully enumerated and ready to be used by the user
* application.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_DeviceEnumerationComplete);
/** This module raises the \ref USB_Disconnect event when an attached USB device is removed from the USB
* bus.
*
- * \see Events.h for more information on this event.
+ * \see \ref Group_Events for more information on this event.
*/
RAISES_EVENT(USB_Disconnect);
#endif
@@ -183,7 +183,7 @@
* - In host mode, it may be disabled at start-up, enabled on the firing of the \ref USB_DeviceAttached
* event and disabled again on the firing of the \ref USB_DeviceUnattached event.
*
- * \see Events.h for more information on the USB events.
+ * \see \ref Group_Events for more information on the USB events.
*
* \ingroup Group_USBManagement
*/