Documentation enhancements to improve documentation cross-references.
This commit is contained in:
parent
6865a7bc09
commit
9cec85bfd9
22 changed files with 425 additions and 241 deletions
|
|
@ -83,22 +83,22 @@
|
|||
extern bool USB_CurrentlySelfPowered;
|
||||
|
||||
/* Throwable Events: */
|
||||
/** This module raises the USB_UnhandledControlPacket event when a request to the default control
|
||||
/** 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.
|
||||
*/
|
||||
RAISES_EVENT(USB_UnhandledControlPacket);
|
||||
|
||||
/** This module raises the USB_ConfigurationChanged event when the host issues a REQ_SetConfiguration
|
||||
/** 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.
|
||||
*/
|
||||
RAISES_EVENT(USB_ConfigurationChanged);
|
||||
|
||||
/** This module raises the USB_DeviceEnumerationComplete event when the host has completed its
|
||||
* enumeration of the device (i.e. when a REQ_SetConfiguration request changes the current configuration
|
||||
/** This module raises the \ref USB_DeviceEnumerationComplete event when the host has completed its
|
||||
* 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.
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
/* Public Interface - May be used in end-application: */
|
||||
/* Macros: */
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER) || defined(__DOXYGEN__)
|
||||
/** Mask for the Options parameter of the USB_Init() function. This indicates that the
|
||||
/** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
|
||||
* USB interface should be initialized in low speed (1.5Mb/s) mode.
|
||||
*
|
||||
* \note Low Speed mode is not available on all USB AVR models.
|
||||
|
|
@ -78,7 +78,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, and should only be
|
||||
* issued if the host is currently allowing remote wakeup events from the device (i.e.,
|
||||
* the USB_RemoteWakeupEnabled flag is set, see DevChapter9.h documentation).
|
||||
* the \ref USB_RemoteWakeupEnabled flag is set).
|
||||
*
|
||||
* \see StdDescriptors.h for more information on the RMWAKEUP feature and device descriptors.
|
||||
*/
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
/** Indicates if a Remote Wakeup request is being sent to the host. This returns true if a
|
||||
* remote wakeup is currently being sent, false otherwise.
|
||||
*
|
||||
* This can be used in conjunction with the USB_Device_IsUSBSuspended() macro to determine if
|
||||
* This can be used in conjunction with the \ref USB_Device_IsUSBSuspended() macro to determine if
|
||||
* a sent RMWAKEUP request was accepted or rejected by the host.
|
||||
*
|
||||
* \note This macro should only be used if the device has indicated to the host that it
|
||||
|
|
@ -99,9 +99,9 @@
|
|||
*/
|
||||
static inline bool USB_Device_IsRemoteWakeupSent(void);
|
||||
|
||||
/** Indicates if the device is currently suspended by the host. While suspended, the device is
|
||||
* to enter a low power state until resumed by the host. While suspended no USB traffic to or
|
||||
* from the device can occur (except for Remote Wakeup requests).
|
||||
/** Indicates if the device is currently suspended by the host. Whilst suspended, the device is
|
||||
* to enter a low power state until resumed by the host. No USB traffic to or from the device
|
||||
* can occur (except for Remote Wakeup requests) during suspension by the host.
|
||||
*
|
||||
* \return Boolean true if the USB communications have been suspended by the host, false otherwise.
|
||||
*/
|
||||
|
|
@ -115,17 +115,17 @@
|
|||
#endif
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the ErrorCode parameter of the USB_DeviceError event.
|
||||
/** Enum for the ErrorCode parameter of the \ref USB_DeviceError event.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
*/
|
||||
enum USB_Device_ErrorCodes_t
|
||||
{
|
||||
DEVICE_ERROR_GetDescriptorNotHooked = 0, /**< Indicates that the GetDescriptor() method
|
||||
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
|
||||
* the GetDescriptor() method.
|
||||
* the \ref USB_GetDescriptor() method.
|
||||
*/
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -69,24 +69,24 @@
|
|||
|
||||
/* Public Interface - May be used in end-application: */
|
||||
/* Macros: */
|
||||
/** Endpoint data direction mask for Endpoint_ConfigureEndpoint(). This indicates that the endpoint
|
||||
/** Endpoint data direction mask for \ref Endpoint_ConfigureEndpoint(). This indicates that the endpoint
|
||||
* should be initialized in the OUT direction - i.e. data flows from host to device.
|
||||
*/
|
||||
#define ENDPOINT_DIR_OUT (0 << EPDIR)
|
||||
|
||||
/** Endpoint data direction mask for Endpoint_ConfigureEndpoint(). This indicates that the endpoint
|
||||
/** Endpoint data direction mask for \ref Endpoint_ConfigureEndpoint(). This indicates that the endpoint
|
||||
* should be initialized in the IN direction - i.e. data flows from device to host.
|
||||
*/
|
||||
#define ENDPOINT_DIR_IN (1 << EPDIR)
|
||||
|
||||
/** Mask for the bank mode selection for the Endpoint_ConfigureEndpoint() macro. This indicates
|
||||
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
|
||||
* that the endpoint should have one single bank, which requires less USB FIFO memory but results
|
||||
* in slower transfers as only one USB device (the AVR or the host) can access the endpoint's
|
||||
* bank at the one time.
|
||||
*/
|
||||
#define ENDPOINT_BANK_SINGLE (0 << EPBK0)
|
||||
|
||||
/** Mask for the bank mode selection for the Endpoint_ConfigureEndpoint() macro. This indicates
|
||||
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
|
||||
* that the endpoint should have two banks, which requires more USB FIFO memory but results
|
||||
* in faster transfers as one USB device (the AVR or the host) can access one bank while the other
|
||||
* accesses the second bank.
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the
|
||||
* endpoint is selected), and will fire the common endpoint interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define ENDPOINT_INT_SETUP UEIENX, (1 << RXSTPE), UEINTX, (1 << RXSTPI)
|
||||
|
||||
|
|
@ -160,7 +160,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the
|
||||
* endpoint is selected), and will fire the common endpoint interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define ENDPOINT_INT_IN UEIENX, (1 << TXINE) , UEINTX, (1 << TXINI)
|
||||
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the
|
||||
* endpoint is selected), and will fire the common endpoint interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define ENDPOINT_INT_OUT UEIENX, (1 << RXOUTE), UEINTX, (1 << RXOUTI)
|
||||
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
static inline uint8_t Endpoint_GetCurrentEndpoint(void);
|
||||
|
||||
/** Selects the given endpoint number. If the address from the device descriptors is used, the
|
||||
* value should be masked with the ENDPOINT_EPNUM_MASK constant to extract only the endpoint
|
||||
* value should be masked with the \ref ENDPOINT_EPNUM_MASK constant to extract only the endpoint
|
||||
* number (and discarding the endpoint direction bit).
|
||||
*
|
||||
* Any endpoint operations which do not require the endpoint number to be indicated will operate on
|
||||
|
|
@ -220,8 +220,7 @@
|
|||
/** Enables the currently selected endpoint so that data can be sent and received through it to
|
||||
* and from a host.
|
||||
*
|
||||
* \note Endpoints must first be configured properly rather than just being enabled via the
|
||||
* Endpoint_ConfigureEndpoint() macro, which calls Endpoint_EnableEndpoint() automatically.
|
||||
* \note Endpoints must first be configured properly via \ref Endpoint_ConfigureEndpoint().
|
||||
*/
|
||||
static inline void Endpoint_EnableEndpoint(void);
|
||||
|
||||
|
|
@ -330,7 +329,7 @@
|
|||
* way for devices to indicate invalid commands to the host so that the current transfer can be
|
||||
* aborted and the host can begin its own recovery sequence.
|
||||
*
|
||||
* The currently selected endpoint remains stalled until either the Endpoint_ClearStall() macro
|
||||
* The currently selected endpoint remains stalled until either the \ref Endpoint_ClearStall() macro
|
||||
* is called, or the host issues a CLEAR FEATURE request to the device for the currently selected
|
||||
* endpoint.
|
||||
*
|
||||
|
|
@ -415,7 +414,7 @@
|
|||
#endif
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible error return codes of the Endpoint_WaitUntilReady function.
|
||||
/** Enum for the possible error return codes of the \ref Endpoint_WaitUntilReady() function.
|
||||
*
|
||||
* \ingroup Group_EndpointRW
|
||||
*/
|
||||
|
|
@ -430,7 +429,7 @@
|
|||
*/
|
||||
ENDPOINT_READYWAIT_Timeout = 3, /**< The host failed to accept or send the next packet
|
||||
* within the software timeout period set by the
|
||||
* USB_STREAM_TIMEOUT_MS macro.
|
||||
* \ref USB_STREAM_TIMEOUT_MS macro.
|
||||
*/
|
||||
};
|
||||
|
||||
|
|
@ -449,7 +448,7 @@
|
|||
*/
|
||||
ENDPOINT_RWSTREAM_ERROR_Timeout = 2, /**< The host failed to accept or send the next packet
|
||||
* within the software timeout period set by the
|
||||
* USB_STREAM_TIMEOUT_MS macro.
|
||||
* \ref USB_STREAM_TIMEOUT_MS macro.
|
||||
*/
|
||||
ENDPOINT_RWSTREAM_ERROR_CallbackAborted = 3, /**< Indicates that the stream's callback function
|
||||
* aborted the transfer early.
|
||||
|
|
@ -703,15 +702,15 @@
|
|||
* device (i.e. endpoint 1 should be configured before endpoint 2 and so on).
|
||||
*
|
||||
* The endpoint type may be one of the EP_TYPE_* macros listed in LowLevel.h and the direction
|
||||
* may be either ENDPOINT_DIR_OUT or ENDPOINT_DIR_IN.
|
||||
* may be either \ref ENDPOINT_DIR_OUT or \ref ENDPOINT_DIR_IN.
|
||||
*
|
||||
* The bank size must indicate the maximum packet size that the endpoint can handle. Different
|
||||
* endpoint numbers can handle different maximum packet sizes - refer to the chosen USB AVR's
|
||||
* datasheet to determine the maximum bank size for each endpoint.
|
||||
*
|
||||
* The banking mode may be either ENDPOINT_BANK_SINGLE or ENDPOINT_BANK_DOUBLE.
|
||||
* The banking mode may be either \ref ENDPOINT_BANK_SINGLE or \ref ENDPOINT_BANK_DOUBLE.
|
||||
*
|
||||
* The success of this routine can be determined via the Endpoint_IsConfigured() macro.
|
||||
* The success of this routine can be determined via the \ref Endpoint_IsConfigured() macro.
|
||||
*
|
||||
* By default, the routine is entirely dynamic, and will accept both constant and variable inputs.
|
||||
* If dynamic configuration is unused, a small space savings can be made by defining the
|
||||
|
|
@ -733,18 +732,18 @@
|
|||
*
|
||||
* \ingroup Group_EndpointRW
|
||||
*
|
||||
* \return A value from the Endpoint_WaitUntilReady_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_WaitUntilReady(void);
|
||||
|
||||
/** Reads and discards the given number of bytes from the endpoint from the given buffer,
|
||||
* discarding fully read packets from the host as needed. The last packet is not automatically
|
||||
* discarded once the remaining bytes has been read; the user is responsible for manually
|
||||
* discarding the last packet from the host via the Endpoint_ClearOUT() macro. Between
|
||||
* discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro. Between
|
||||
* each USB packet, the given stream callback function is executed repeatedly until the next
|
||||
* packet is ready, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -755,7 +754,7 @@
|
|||
* \param Length Number of bytes to send via the currently selected endpoint.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Discard_Stream(uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -766,11 +765,11 @@
|
|||
/** Writes the given number of bytes to the endpoint from the given buffer in little endian,
|
||||
* sending full packets to the host as needed. The last packet filled is not automatically sent;
|
||||
* the user is responsible for manually sending the last written packet to the host via the
|
||||
* Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function
|
||||
* \ref Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function
|
||||
* is executed repeatedly until the endpoint is ready to accept the next packet, allowing for early
|
||||
* aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -782,7 +781,7 @@
|
|||
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Write_Stream_LE(const void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -793,11 +792,11 @@
|
|||
/** Writes the given number of bytes to the endpoint from the given buffer in big endian,
|
||||
* sending full packets to the host as needed. The last packet filled is not automatically sent;
|
||||
* the user is responsible for manually sending the last written packet to the host via the
|
||||
* Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function
|
||||
* \ref Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function
|
||||
* is executed repeatedly until the endpoint is ready to accept the next packet, allowing for early
|
||||
* aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -809,7 +808,7 @@
|
|||
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Write_Stream_BE(const void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -820,11 +819,11 @@
|
|||
/** Reads the given number of bytes from the endpoint from the given buffer in little endian,
|
||||
* discarding fully read packets from the host as needed. The last packet is not automatically
|
||||
* discarded once the remaining bytes has been read; the user is responsible for manually
|
||||
* discarding the last packet from the host via the Endpoint_ClearOUT() macro. Between
|
||||
* discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro. Between
|
||||
* each USB packet, the given stream callback function is executed repeatedly until the endpoint
|
||||
* is ready to accept the next packet, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -836,7 +835,7 @@
|
|||
* \param Length Number of bytes to send via the currently selected endpoint.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Read_Stream_LE(void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -847,11 +846,11 @@
|
|||
/** Reads the given number of bytes from the endpoint from the given buffer in big endian,
|
||||
* discarding fully read packets from the host as needed. The last packet is not automatically
|
||||
* discarded once the remaining bytes has been read; the user is responsible for manually
|
||||
* discarding the last packet from the host via the Endpoint_ClearOUT() macro. Between
|
||||
* discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro. Between
|
||||
* each USB packet, the given stream callback function is executed repeatedly until the endpoint
|
||||
* is ready to accept the next packet, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -863,7 +862,7 @@
|
|||
* \param Length Number of bytes to send via the currently selected endpoint.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Read_Stream_BE(void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -874,7 +873,7 @@
|
|||
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,
|
||||
* sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
|
||||
* in both failure and success states; the user is responsible for manually clearing the setup OUT to
|
||||
* finalize the transfer via the Endpoint_ClearOUT() macro.
|
||||
* finalize the transfer via the \ref Endpoint_ClearOUT() macro.
|
||||
*
|
||||
* \note This routine should only be used on CONTROL type endpoints.
|
||||
*
|
||||
|
|
@ -886,14 +885,14 @@
|
|||
* \param Buffer Pointer to the source data buffer to read from.
|
||||
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.
|
||||
*
|
||||
* \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
|
||||
|
||||
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
|
||||
* sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
|
||||
* in both failure and success states; the user is responsible for manually clearing the setup OUT to
|
||||
* finalize the transfer via the Endpoint_ClearOUT() macro.
|
||||
* finalize the transfer via the \ref Endpoint_ClearOUT() macro.
|
||||
*
|
||||
* \note This routine should only be used on CONTROL type endpoints.
|
||||
*
|
||||
|
|
@ -905,14 +904,14 @@
|
|||
* \param Buffer Pointer to the source data buffer to read from.
|
||||
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.
|
||||
*
|
||||
* \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Write_Control_Stream_BE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
|
||||
|
||||
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
|
||||
* discarding fully read packets from the host as needed. The device IN acknowledgement is not
|
||||
* automatically sent after success or failure states; the user is responsible for manually sending the
|
||||
* setup IN to finalize the transfer via the Endpoint_ClearIN() macro.
|
||||
* setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.
|
||||
*
|
||||
* \note This routine should only be used on CONTROL type endpoints.
|
||||
*
|
||||
|
|
@ -924,14 +923,14 @@
|
|||
* \param Buffer Pointer to the destination data buffer to write to.
|
||||
* \param Length Number of bytes to send via the currently selected endpoint.
|
||||
*
|
||||
* \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
|
||||
|
||||
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
|
||||
* discarding fully read packets from the host as needed. The device IN acknowledgement is not
|
||||
* automatically sent after success or failure states; the user is responsible for manually sending the
|
||||
* setup IN to finalize the transfer via the Endpoint_ClearIN() macro.
|
||||
* setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.
|
||||
*
|
||||
* \note This routine should only be used on CONTROL type endpoints.
|
||||
*
|
||||
|
|
@ -943,7 +942,7 @@
|
|||
* \param Buffer Pointer to the destination data buffer to write to.
|
||||
* \param Length Number of bytes to send via the currently selected endpoint.
|
||||
*
|
||||
* \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
* library will return a timeout error code.
|
||||
*
|
||||
* This value may be overridden in the user project makefile as the value of the
|
||||
* USB_HOST_TIMEOUT_MS token, and passed to the compiler using the -D switch.
|
||||
* \ref USB_HOST_TIMEOUT_MS token, and passed to the compiler using the -D switch.
|
||||
*/
|
||||
#define USB_HOST_TIMEOUT_MS 1000
|
||||
#endif
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
*/
|
||||
static inline void USB_Host_ResetBus(void);
|
||||
|
||||
/** Determines if a previously issued bus reset (via the USB_Host_ResetBus() macro) has
|
||||
/** Determines if a previously issued bus reset (via the \ref USB_Host_ResetBus() macro) has
|
||||
* completed.
|
||||
*
|
||||
* \return Boolean true if no bus reset is currently being sent, false otherwise.
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
*/
|
||||
static inline void USB_Host_SuspendBus(void);
|
||||
|
||||
/** Determines if the USB bus has been suspended via the use of the USB_Host_SuspendBus() macro,
|
||||
/** Determines if the USB bus has been suspended via the use of the \ref USB_Host_SuspendBus() macro,
|
||||
* false otherwise. While suspended, no USB communications can occur until the bus is resumed,
|
||||
* except for the Remote Wakeup event from the device if supported.
|
||||
*
|
||||
|
|
@ -200,28 +200,28 @@
|
|||
HOST_STATE_Suspended = 13, /**< May be implemented by the user project. */
|
||||
};
|
||||
|
||||
/** Enum for the error codes for the USB_HostError event.
|
||||
/** Enum for the error codes for the \ref USB_HostError event.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
*/
|
||||
enum USB_Host_ErrorCodes_t
|
||||
{
|
||||
HOST_ERROR_VBusVoltageDip = 0, /**< VBUS voltage dipped to an unacceptable level. This
|
||||
* error may be the result of an attached device drawing
|
||||
* error may be the result of an attached device drawing
|
||||
* too much current from the VBUS line, or due to the
|
||||
* AVR's power source being unable to supply sufficient
|
||||
* current.
|
||||
*/
|
||||
};
|
||||
|
||||
/** Enum for the error codes for the USB_DeviceEnumerationFailed event.
|
||||
/** Enum for the error codes for the \ref USB_DeviceEnumerationFailed event.
|
||||
*
|
||||
* \see Events.h for more information on this event.
|
||||
*/
|
||||
enum USB_Host_EnumerationErrorCodes_t
|
||||
{
|
||||
HOST_ENUMERROR_NoError = 0, /**< No error occurred. Used internally, this is not a valid
|
||||
* ErrorCode parameter value for the USB_DeviceEnumerationFailed
|
||||
* ErrorCode parameter value for the \ref USB_DeviceEnumerationFailed
|
||||
* event.
|
||||
*/
|
||||
HOST_ENUMERROR_WaitStage = 1, /**< One of the delays between enumeration steps failed
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Public Interface - May be used in end-application: */
|
||||
/* Enums: */
|
||||
/** Enum for the USB_Host_SendControlRequest() return code, indicating the reason for the error
|
||||
/** Enum for the \ref USB_Host_SendControlRequest() return code, indicating the reason for the error
|
||||
* if the transfer of the request is unsuccessful.
|
||||
*
|
||||
* \ingroup Group_PipeControlReq
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
};
|
||||
|
||||
/* Function Prototypes: */
|
||||
/** Sends the request stored in the USB_ControlRequest global structure to the attached device,
|
||||
/** Sends the request stored in the \ref USB_ControlRequest global structure to the attached device,
|
||||
* and transfers the data stored in the buffer to the device, or from the device to the buffer
|
||||
* as requested. The transfer is made on the currently selected pipe.
|
||||
*
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
* \param BufferPtr Pointer to the start of the data buffer if the request has a data stage, or
|
||||
* NULL if the request transfers no data to or from the device.
|
||||
*
|
||||
* \return A value from the USB_Host_SendControlErrorCodes_t enum to indicate the result.
|
||||
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
|
||||
*/
|
||||
uint8_t USB_Host_SendControlRequest(void* BufferPtr);
|
||||
|
||||
|
|
|
|||
|
|
@ -102,18 +102,18 @@
|
|||
|
||||
/* Public Interface - May be used in end-application: */
|
||||
/* Macros: */
|
||||
/** Mode mask for the USB_CurrentMode global. This indicates that the USB interface is currently not
|
||||
/** Mode mask for the \ref USB_CurrentMode global. This indicates that the USB interface is currently not
|
||||
* initialized into any mode.
|
||||
*/
|
||||
#define USB_MODE_NONE 0
|
||||
|
||||
/** Mode mask for the USB_CurrentMode global and the USB_Init() function. This indicates that the
|
||||
/** Mode mask for the \ref USB_CurrentMode global and the \ref USB_Init() function. This indicates that the
|
||||
* USB interface is or should be initialized in the USB device mode.
|
||||
*/
|
||||
#define USB_MODE_DEVICE 1
|
||||
|
||||
#if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
|
||||
/** Mode mask for the USB_CurrentMode global and the USB_Init() function. This indicates that the
|
||||
/** Mode mask for the \ref USB_CurrentMode global and the \ref USB_Init() function. This indicates that the
|
||||
* USB interface is or should be initialized in the USB host mode.
|
||||
*
|
||||
* \note This token is not available on AVR models which do not support host mode.
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
|
||||
/** Mode mask for the the USB_Init() function. This indicates that the USB interface should be
|
||||
/** Mode mask for the the \ref USB_Init() function. This indicates that the USB interface should be
|
||||
* initialized into whatever mode the UID pin of the USB AVR indicates, and that the device
|
||||
* should swap over its mode when the level of the UID pin changes during operation.
|
||||
*
|
||||
|
|
@ -131,27 +131,27 @@
|
|||
#define USB_MODE_UID 3
|
||||
#endif
|
||||
|
||||
/** Regulator disable option mask for USB_Init(). This indicates that the internal 3.3V USB data pad
|
||||
/** Regulator disable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad
|
||||
* regulator should be enabled to regulate the data pin voltages to within the USB standard.
|
||||
*
|
||||
* \note See USB AVR data sheet for more information on the internal pad regulator.
|
||||
*/
|
||||
#define USB_OPT_REG_DISABLED (1 << 1)
|
||||
|
||||
/** Regulator enable option mask for USB_Init(). This indicates that the internal 3.3V USB data pad
|
||||
/** Regulator enable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad
|
||||
* regulator should be disabled and the AVR's VCC level used for the data pads.
|
||||
*
|
||||
* \note See USB AVR data sheet for more information on the internal pad regulator.
|
||||
*/
|
||||
#define USB_OPT_REG_ENABLED (0 << 1)
|
||||
|
||||
/** Manual PLL control option mask for USB_Init(). This indicates to the library that the user application
|
||||
/** Manual PLL control option mask for \ref USB_Init(). This indicates to the library that the user application
|
||||
* will take full responsibility for controlling the AVR's PLL (used to generate the high frequency clock
|
||||
* that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations.
|
||||
*/
|
||||
#define USB_OPT_MANUAL_PLL (1 << 2)
|
||||
|
||||
/** Automatic PLL control option mask for USB_Init(). This indicates to the library that the library should
|
||||
/** Automatic PLL control option mask for \ref USB_Init(). This indicates to the library that the library should
|
||||
* take full responsibility for controlling the AVR's PLL (used to generate the high frequency clock
|
||||
* that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations.
|
||||
*/
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
|
||||
/** Detaches the device from the USB bus. This has the effect of removing the device from any
|
||||
* host if, ceasing USB communications. If no host is present, this prevents any host from
|
||||
* enumerating the device once attached until USB_Attach() is called.
|
||||
* enumerating the device once attached until \ref USB_Attach() is called.
|
||||
*/
|
||||
#define USB_Detach() MACROS{ UDCON |= (1 << DETACH); }MACROE
|
||||
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
* is not received or acknowledged within this time period, the stream function will fail.
|
||||
*
|
||||
* This value may be overridden in the user project makefile as the value of the
|
||||
* USB_STREAM_TIMEOUT_MS token, and passed to the compiler using the -D switch.
|
||||
* \ref USB_STREAM_TIMEOUT_MS token, and passed to the compiler using the -D switch.
|
||||
*/
|
||||
#define USB_STREAM_TIMEOUT_MS 100
|
||||
#endif
|
||||
|
|
@ -229,7 +229,7 @@
|
|||
* interface reset and re-enumeration.
|
||||
*
|
||||
* \param Mode This is a mask indicating what mode the USB interface is to be initialized to.
|
||||
* Valid mode masks are USB_MODE_DEVICE, USB_MODE_HOST or USB_MODE_UID.
|
||||
* Valid mode masks are \ref USB_MODE_DEVICE, \ref USB_MODE_HOST or \ref USB_MODE_UID.
|
||||
*
|
||||
* \param Options Mask indicating the options which should be used when initializing the USB
|
||||
* interface to control the USB interface's behaviour. This should be comprised of
|
||||
|
|
@ -272,7 +272,7 @@
|
|||
|
||||
/** Shuts down the USB interface. This turns off the USB interface after deallocating all USB FIFO
|
||||
* memory, endpoints and pipes. When turned off, no USB functionality can be used until the interface
|
||||
* is restarted with the USB_Init() function.
|
||||
* is restarted with the \ref USB_Init() function.
|
||||
*/
|
||||
void USB_ShutDown(void);
|
||||
|
||||
|
|
@ -283,11 +283,11 @@
|
|||
|
||||
/* Enums: */
|
||||
/** Enum for error codes relating to the powering on of the USB interface. These error codes are
|
||||
* used in the ErrorCode parameter value of the USB_PowerOnFail event.
|
||||
* used in the ErrorCode parameter value of the \ref USB_PowerOnFail event.
|
||||
*/
|
||||
enum USB_PowerOnErrorCodes_t
|
||||
{
|
||||
POWERON_ERROR_NoUSBModeSpecified = 0, /**< Indicates that USB_Init() was called with an
|
||||
POWERON_ERROR_NoUSBModeSpecified = 0, /**< Indicates that \ref USB_Init() was called with an
|
||||
* invalid or missing Mode parameter.
|
||||
*/
|
||||
};
|
||||
|
|
@ -305,7 +305,7 @@
|
|||
|
||||
#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 USB_Init()
|
||||
/** 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
|
||||
|
|
@ -314,7 +314,7 @@
|
|||
#endif
|
||||
|
||||
/* Throwable Events: */
|
||||
/** This module raises the USB_Disconnect event if the USB interface is reset (such as during a mode
|
||||
/** This module raises the \ref USB_Disconnect event if the USB interface is reset (such as during a mode
|
||||
* change while in UID mode) while the USB interface is connected to a device when in host mode, or
|
||||
* a host while in device mode.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
* There are two different methods of sending a SRP - either pulses on the VBUS line, or by
|
||||
* pulsing the Data + line via the internal pull-up resistor.
|
||||
*
|
||||
* \param SRPTypeMask Mask indicating the type of SRP to use, either USB_OTG_SRP_VBUS or USB_OTG_STP_DATA.
|
||||
* \param SRPTypeMask Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or \ref USB_OTG_STP_DATA.
|
||||
*/
|
||||
static inline void USB_OTG_DEV_Initiate_SRP(uint8_t SRPTypeMask);
|
||||
#else
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
|
||||
#define USB_OTG_HOST_Accept_HNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
|
||||
|
||||
#define USB_OTG_HOST_Reject_HNP() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
|
||||
#define USB_OTG_HOST_Reject_HNP() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
|
||||
|
||||
#define USB_OTG_HOST_IsHNPReceived() ((OTGCON & (1 << HNPREQ)) ? true : false)
|
||||
|
||||
|
|
|
|||
|
|
@ -77,43 +77,43 @@
|
|||
|
||||
/* Public Interface - May be used in end-application: */
|
||||
/* Macros: */
|
||||
/** Mask for Pipe_GetErrorFlags(), indicating that a CRC error occurred in the pipe on the received data. */
|
||||
/** Mask for \ref Pipe_GetErrorFlags(), indicating that a CRC error occurred in the pipe on the received data. */
|
||||
#define PIPE_ERRORFLAG_CRC16 (1 << 4)
|
||||
|
||||
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware timeout error occurred in the pipe. */
|
||||
/** Mask for \ref Pipe_GetErrorFlags(), indicating that a hardware timeout error occurred in the pipe. */
|
||||
#define PIPE_ERRORFLAG_TIMEOUT (1 << 3)
|
||||
|
||||
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware PID error occurred in the pipe. */
|
||||
/** Mask for \ref Pipe_GetErrorFlags(), indicating that a hardware PID error occurred in the pipe. */
|
||||
#define PIPE_ERRORFLAG_PID (1 << 2)
|
||||
|
||||
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware data PID error occurred in the pipe. */
|
||||
/** Mask for \ref Pipe_GetErrorFlags(), indicating that a hardware data PID error occurred in the pipe. */
|
||||
#define PIPE_ERRORFLAG_DATAPID (1 << 1)
|
||||
|
||||
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware data toggle error occurred in the pipe. */
|
||||
/** Mask for \ref Pipe_GetErrorFlags(), indicating that a hardware data toggle error occurred in the pipe. */
|
||||
#define PIPE_ERRORFLAG_DATATGL (1 << 0)
|
||||
|
||||
/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes),
|
||||
/** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes),
|
||||
* which will trigger a control request on the attached device when data is written to the pipe.
|
||||
*/
|
||||
#define PIPE_TOKEN_SETUP (0 << PTOKEN0)
|
||||
|
||||
/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
|
||||
/** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
|
||||
* indicating that the pipe data will flow from device to host.
|
||||
*/
|
||||
#define PIPE_TOKEN_IN (1 << PTOKEN0)
|
||||
|
||||
/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
|
||||
/** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
|
||||
* indicating that the pipe data will flow from host to device.
|
||||
*/
|
||||
#define PIPE_TOKEN_OUT (2 << PTOKEN0)
|
||||
|
||||
/** Mask for the bank mode selection for the Pipe_ConfigurePipe() macro. This indicates that the pipe
|
||||
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
|
||||
* should have one single bank, which requires less USB FIFO memory but results in slower transfers as
|
||||
* only one USB device (the AVR or the attached device) can access the pipe's bank at the one time.
|
||||
*/
|
||||
#define PIPE_BANK_SINGLE (0 << EPBK0)
|
||||
|
||||
/** Mask for the bank mode selection for the Pipe_ConfigurePipe() macro. This indicates that the pipe
|
||||
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
|
||||
* should have two banks, which requires more USB FIFO memory but results in faster transfers as one
|
||||
* USB device (the AVR or the attached device) can access one bank while the other accesses the second
|
||||
* bank.
|
||||
|
|
@ -168,7 +168,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe
|
||||
* is selected), and will fire the common pipe interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define PIPE_INT_IN UPIENX, (1 << RXINE) , UPINTX, (1 << RXINI)
|
||||
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe
|
||||
* is selected), and will fire the common pipe interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define PIPE_INT_OUT UPIENX, (1 << TXOUTE), UPINTX, (1 << TXOUTI)
|
||||
|
||||
|
|
@ -195,7 +195,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe
|
||||
* is selected), and will fire the common pipe interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define PIPE_INT_SETUP UPIENX, (1 << TXSTPE) , UPINTX, (1 << TXSTPI)
|
||||
|
||||
|
|
@ -208,9 +208,9 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe
|
||||
* is selected), and will fire the common pipe interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*
|
||||
* \see Pipe_GetErrorFlags() for more information on the pipe errors.
|
||||
* \see \ref Pipe_GetErrorFlags() for more information on the pipe errors.
|
||||
*/
|
||||
#define PIPE_INT_ERROR UPIENX, (1 << PERRE), UPINTX, (1 << PERRI)
|
||||
|
||||
|
|
@ -223,9 +223,9 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe
|
||||
* is selected), and will fire the common pipe interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*
|
||||
* \see Pipe_IsNAKReceived() for more information on pipe NAKs.
|
||||
* \see \ref Pipe_IsNAKReceived() for more information on pipe NAKs.
|
||||
*/
|
||||
#define PIPE_INT_NAK UPIENX, (1 << NAKEDE), UPINTX, (1 << NAKEDI)
|
||||
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
* \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe
|
||||
* is selected), and will fire the common pipe interrupt vector.
|
||||
*
|
||||
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
* \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.
|
||||
*/
|
||||
#define PIPE_INT_STALL UPIENX, (1 << RXSTALLE), UPINTX, (1 << RXSTALLI)
|
||||
|
||||
|
|
@ -278,8 +278,7 @@
|
|||
/** Enables the currently selected pipe so that data can be sent and received through it to and from
|
||||
* an attached device.
|
||||
*
|
||||
* \note Pipes must first be configured properly rather than just being enabled via the
|
||||
* Pipe_ConfigurePipe() macro, which calls Pipe_EnablePipe() automatically.
|
||||
* \note Pipes must first be configured properly via \ref Pipe_ConfigurePipe().
|
||||
*/
|
||||
static inline void Pipe_EnablePipe(void);
|
||||
|
||||
|
|
@ -365,7 +364,7 @@
|
|||
/** Determines if the master pipe error flag is set for the currently selected pipe, indicating that
|
||||
* some sort of hardware error has occurred on the pipe.
|
||||
*
|
||||
* \see Pipe_GetErrorFlags() macro for information on retrieving the exact error flag.
|
||||
* \see \ref Pipe_GetErrorFlags() macro for information on retrieving the exact error flag.
|
||||
*
|
||||
* \return Boolean true if an error has occurred on the selected pipe, false otherwise
|
||||
*/
|
||||
|
|
@ -445,7 +444,7 @@
|
|||
/** Determines if the device sent a NAK (Negative Acknowledge) in response to the last sent packet on
|
||||
* the currently selected pipe. This occurs when the host sends a packet to the device, but the device
|
||||
* is not currently ready to handle the packet (i.e. its endpoint banks are full). Once a NAK has been
|
||||
* received, it must be cleared using Pipe_ClearNAKReceived() before the previous (or any other) packet
|
||||
* received, it must be cleared using \ref Pipe_ClearNAKReceived() before the previous (or any other) packet
|
||||
* can be re-sent.
|
||||
*
|
||||
* \ingroup Group_PipePacketManagement
|
||||
|
|
@ -458,7 +457,7 @@
|
|||
*
|
||||
* \ingroup Group_PipePacketManagement
|
||||
*
|
||||
* \see Pipe_IsNAKReceived() for more details.
|
||||
* \see \ref Pipe_IsNAKReceived() for more details.
|
||||
*/
|
||||
static inline void Pipe_ClearNAKReceived(void);
|
||||
|
||||
|
|
@ -559,7 +558,7 @@
|
|||
PIPE_READYWAIT_DeviceDisconnected = 2, /**< Device was disconnected from the host while waiting. */
|
||||
PIPE_READYWAIT_Timeout = 3, /**< The device failed to accept or send the next packet
|
||||
* within the software timeout period set by the
|
||||
* USB_STREAM_TIMEOUT_MS macro.
|
||||
* \ref USB_STREAM_TIMEOUT_MS macro.
|
||||
*/
|
||||
};
|
||||
|
||||
|
|
@ -576,7 +575,7 @@
|
|||
*/
|
||||
PIPE_RWSTREAM_ERROR_Timeout = 3, /**< The device failed to accept or send the next packet
|
||||
* within the software timeout period set by the
|
||||
* USB_STREAM_TIMEOUT_MS macro.
|
||||
* \ref USB_STREAM_TIMEOUT_MS macro.
|
||||
*/
|
||||
PIPE_RWSTREAM_ERROR_CallbackAborted = 4, /**< Indicates that the stream's callback function aborted
|
||||
* the transfer early.
|
||||
|
|
@ -811,9 +810,9 @@
|
|||
* numbers can handle different maximum packet sizes - refer to the chosen USB AVR's datasheet to
|
||||
* determine the maximum bank size for each pipe.
|
||||
*
|
||||
* The banking mode may be either PIPE_BANK_SINGLE or PIPE_BANK_DOUBLE.
|
||||
* The banking mode may be either \ref PIPE_BANK_SINGLE or \ref PIPE_BANK_DOUBLE.
|
||||
*
|
||||
* A newly configured pipe is frozen by default, and must be unfrozen before use via the Pipe_Unfreeze() macro.
|
||||
* A newly configured pipe is frozen by default, and must be unfrozen before use via the \ref Pipe_Unfreeze() macro.
|
||||
*
|
||||
* \note This routine will select the specified pipe, and the pipe will remain selected once the
|
||||
* routine completes regardless of if the pipe configuration succeeds.
|
||||
|
|
@ -835,10 +834,10 @@
|
|||
/** Writes the given number of bytes to the pipe from the given buffer in little endian,
|
||||
* sending full packets to the device as needed. The last packet filled is not automatically sent;
|
||||
* the user is responsible for manually sending the last written packet to the host via the
|
||||
* Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
|
||||
* \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
|
||||
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -848,7 +847,7 @@
|
|||
* \param Length Number of bytes to read for the currently selected pipe into the buffer.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Pipe_Write_Stream_LE(const void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -859,10 +858,10 @@
|
|||
/** Writes the given number of bytes to the pipe from the given buffer in big endian,
|
||||
* sending full packets to the device as needed. The last packet filled is not automatically sent;
|
||||
* the user is responsible for manually sending the last written packet to the host via the
|
||||
* Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
|
||||
* \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
|
||||
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -872,7 +871,7 @@
|
|||
* \param Length Number of bytes to read for the currently selected pipe into the buffer.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Pipe_Write_Stream_BE(const void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -882,11 +881,11 @@
|
|||
|
||||
/** Reads and discards the given number of bytes from the pipe, discarding fully read packets from the host
|
||||
* as needed. The last packet is not automatically discarded once the remaining bytes has been read; the
|
||||
* user is responsible for manually discarding the last packet from the device via the Pipe_ClearIN() macro.
|
||||
* user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearIN() macro.
|
||||
* Between each USB packet, the given stream callback function is executed repeatedly until the next packet is ready,
|
||||
* allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -895,7 +894,7 @@
|
|||
* \param Length Number of bytes to send via the currently selected pipe.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Pipe_Discard_Stream(uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -906,10 +905,10 @@
|
|||
/** Reads the given number of bytes from the pipe into the given buffer in little endian,
|
||||
* sending full packets to the device as needed. The last packet filled is not automatically sent;
|
||||
* the user is responsible for manually sending the last written packet to the host via the
|
||||
* Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
|
||||
* \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
|
||||
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -919,7 +918,7 @@
|
|||
* \param Length Number of bytes to read for the currently selected pipe to read from.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Pipe_Read_Stream_LE(void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
@ -930,10 +929,10 @@
|
|||
/** Reads the given number of bytes from the pipe into the given buffer in big endian,
|
||||
* sending full packets to the device as needed. The last packet filled is not automatically sent;
|
||||
* the user is responsible for manually sending the last written packet to the host via the
|
||||
* Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
|
||||
* \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
|
||||
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
|
||||
*
|
||||
* The callback routine should be created using the STREAM_CALLBACK() macro. If the token
|
||||
* The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
|
||||
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
|
||||
* and this function has the Callback parameter omitted.
|
||||
*
|
||||
|
|
@ -943,7 +942,7 @@
|
|||
* \param Length Number of bytes to read for the currently selected pipe to read from.
|
||||
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
|
||||
*
|
||||
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
|
||||
*/
|
||||
uint8_t Pipe_Read_Stream_BE(void* Buffer, uint16_t Length
|
||||
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue