Changed PIPE_CONTROLPIPE_DEFAULT_SIZE from 8 to 64 to try to prevent problems with faulty devices which do not respect the given wLength value when reading in the device descriptor.
Further documentation improvements - removed file view from the main library documentation, replaced file references in the documentation with group references.
This commit is contained in:
parent
edcfaf7716
commit
253deb996f
60 changed files with 127 additions and 128 deletions
|
@ -86,14 +86,14 @@
|
|||
/** This module raises the \ref USB_UnhandledControlPacket event when a request to the default control
|
||||
* endpoint has been received, but the library does not implement an internal handler for it.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
* \see \ref Group_Events for more information on this event.
|
||||
*/
|
||||
RAISES_EVENT(USB_UnhandledControlPacket);
|
||||
|
||||
/** This module raises the \ref USB_ConfigurationChanged event when the host issues a \ref REQ_SetConfiguration
|
||||
* device request, to change the currently selected configuration number.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
* \see \ref Group_Events for more information on this event.
|
||||
*/
|
||||
RAISES_EVENT(USB_ConfigurationChanged);
|
||||
|
||||
|
@ -101,7 +101,7 @@
|
|||
* enumeration of the device (i.e. when a \ref REQ_SetConfiguration request changes the current configuration
|
||||
* number from 0 to a non-zero value).
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
* \see \ref Group_Events for more information on this event.
|
||||
*/
|
||||
RAISES_EVENT(USB_DeviceEnumerationComplete);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
* issued if the host is currently allowing remote wakeup events from the device (i.e.,
|
||||
* the \ref USB_RemoteWakeupEnabled flag is set).
|
||||
*
|
||||
* \see StdDescriptors.h for more information on the RMWAKEUP feature and device descriptors.
|
||||
* \see \ref Group_Descriptors for more information on the RMWAKEUP feature and device descriptors.
|
||||
*/
|
||||
static inline void USB_Device_SendRemoteWakeup(void);
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
|||
* \note This macro should only be used if the device has indicated to the host that it
|
||||
* supports the Remote Wakeup feature in the device descriptors.
|
||||
*
|
||||
* \see StdDescriptors.h for more information on the RMWAKEUP feature and device descriptors.
|
||||
* \see \ref Group_Descriptors for more information on the RMWAKEUP feature and device descriptors.
|
||||
*
|
||||
* \return Boolean true if no Remote Wakeup request is currently being sent, false otherwise
|
||||
*/
|
||||
|
@ -124,7 +124,7 @@
|
|||
DEVICE_ERROR_GetDescriptorNotHooked = 0, /**< Indicates that the \ref USB_GetDescriptor() method
|
||||
* has not been hooked by the user application.
|
||||
*
|
||||
* \see StdDescriptors.h for more information on
|
||||
* \see \ref Group_Descriptors for more information on
|
||||
* the \ref USB_GetDescriptor() method.
|
||||
*/
|
||||
};
|
||||
|
|
|
@ -179,8 +179,7 @@
|
|||
*
|
||||
* For information on each state, refer to the USB 2.0 specification. Some states have
|
||||
*
|
||||
* \see USBTask.h for information on the global variable USB_HostState, which stores the
|
||||
* current host state machine state.
|
||||
* \see \ref USB_HostState, which stores the current host state machine state.
|
||||
*/
|
||||
enum USB_Host_States_t
|
||||
{
|
||||
|
@ -202,7 +201,7 @@
|
|||
|
||||
/** Enum for the error codes for the \ref USB_HostError event.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
* \see \ref Group_Events for more information on this event.
|
||||
*/
|
||||
enum USB_Host_ErrorCodes_t
|
||||
{
|
||||
|
@ -216,7 +215,7 @@
|
|||
|
||||
/** Enum for the error codes for the \ref USB_DeviceEnumerationFailed event.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
* \see \ref Group_Events for more information on this event.
|
||||
*/
|
||||
enum USB_Host_EnumerationErrorCodes_t
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
*
|
||||
* \note This token is not available on AVR models which do not support host mode.
|
||||
*/
|
||||
#define USB_MODE_HOST 2
|
||||
#define USB_MODE_HOST 2
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
|
||||
|
@ -159,25 +159,25 @@
|
|||
|
||||
/** Mask for a CONTROL type endpoint or pipe.
|
||||
*
|
||||
* \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
|
||||
* \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
|
||||
*/
|
||||
#define EP_TYPE_CONTROL 0x00
|
||||
|
||||
/** Mask for an ISOCHRONOUS type endpoint or pipe.
|
||||
*
|
||||
* \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
|
||||
* \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
|
||||
*/
|
||||
#define EP_TYPE_ISOCHRONOUS 0x01
|
||||
|
||||
/** Mask for a BULK type endpoint or pipe.
|
||||
*
|
||||
* \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
|
||||
* \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
|
||||
*/
|
||||
#define EP_TYPE_BULK 0x02
|
||||
|
||||
/** Mask for an INTERRUPT type endpoint or pipe.
|
||||
*
|
||||
* \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
|
||||
* \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
|
||||
*/
|
||||
#define EP_TYPE_INTERRUPT 0x03
|
||||
|
||||
|
@ -304,13 +304,13 @@
|
|||
#endif
|
||||
|
||||
#if !defined(USE_STATIC_OPTIONS) || defined(__DOXYGEN__)
|
||||
extern volatile uint8_t USB_Options;
|
||||
/** Indicates the current USB options that the USB interface was initialized with when \ref USB_Init()
|
||||
* was called. This value will be one of the USB_MODE_* masks defined elsewhere in this module.
|
||||
*
|
||||
* \note This variable should be treated as read-only in the user application, and never manually
|
||||
* changed in value.
|
||||
*/
|
||||
extern volatile uint8_t USB_Options;
|
||||
#endif
|
||||
|
||||
/* Throwable Events: */
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
/** Default size of the default control pipe's bank, until altered by the Endpoint0Size value
|
||||
* in the device descriptor of the attached device.
|
||||
*/
|
||||
#define PIPE_CONTROLPIPE_DEFAULT_SIZE 8
|
||||
#define PIPE_CONTROLPIPE_DEFAULT_SIZE 64
|
||||
|
||||
/** Pipe number mask, for masking against pipe addresses to retrieve the pipe's numerical address
|
||||
* in the device.
|
||||
|
@ -955,6 +955,10 @@
|
|||
/* Macros: */
|
||||
#define PIPE_TOKEN_MASK (0x03 << PTOKEN0)
|
||||
|
||||
#if !defined(ENDPOINT_CONTROLEP)
|
||||
#define ENDPOINT_CONTROLEP 0
|
||||
#endif
|
||||
|
||||
#define Pipe_AllocateMemory() MACROS{ UPCFG1X |= (1 << ALLOC); }MACROE
|
||||
#define Pipe_DeallocateMemory() MACROS{ UPCFG1X &= ~(1 << ALLOC); }MACROE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue