aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel')
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.h6
-rw-r--r--LUFA/Drivers/USB/LowLevel/Device.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Endpoint.h66
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.h20
-rw-r--r--LUFA/Drivers/USB/LowLevel/OTG.h33
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h92
6 files changed, 110 insertions, 109 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h
index 8568cff25..ab62c535a 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h
@@ -80,9 +80,9 @@
*/
enum USB_DescriptorMemorySpaces_t
{
- MEMSPACE_FLASH = 0, /**< Indicates the requested descriptor is located in FLASH memory */
- MEMSPACE_EEPROM = 1, /**< Indicates the requested descriptor is located in EEPROM memory */
- MEMSPACE_RAM = 2, /**< Indicates the requested descriptor is located in RAM memory */
+ MEMSPACE_FLASH = 0, /**< Indicates the requested descriptor is located in FLASH memory. */
+ MEMSPACE_EEPROM = 1, /**< Indicates the requested descriptor is located in EEPROM memory. */
+ MEMSPACE_RAM = 2, /**< Indicates the requested descriptor is located in RAM memory. */
};
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h
index cc2af15c0..7cd2d8b06 100644
--- a/LUFA/Drivers/USB/LowLevel/Device.h
+++ b/LUFA/Drivers/USB/LowLevel/Device.h
@@ -205,7 +205,7 @@
* USE_EEPROM_DESCRIPTORS tokens may be defined in the project makefile and passed to the compiler by the -D
* switch.
*
- * \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise
+ * \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise.
*/
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress
#if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index 60e1018f6..daf3d814b 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h
@@ -186,7 +186,7 @@
*
* \ingroup Group_EndpointRW
*
- * \return Total number of bytes in the currently selected Endpoint's FIFO buffer
+ * \return Total number of bytes in the currently selected Endpoint's FIFO buffer.
*/
static inline uint16_t Endpoint_BytesInEndpoint(void);
@@ -194,7 +194,7 @@
* the currently selected endpoint number so that it can be restored after another endpoint has
* been manipulated.
*
- * \return Index of the currently selected endpoint
+ * \return Index of the currently selected endpoint.
*/
static inline uint8_t Endpoint_GetCurrentEndpoint(void);
@@ -205,14 +205,14 @@
* Any endpoint operations which do not require the endpoint number to be indicated will operate on
* the currently selected endpoint.
*
- * \param[in] EndpointNumber Endpoint number to select
+ * \param[in] EndpointNumber Endpoint number to select.
*/
static inline void Endpoint_SelectEndpoint(uint8_t EndpointNumber);
/** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's
* In and Out pointers to the bank's contents.
*
- * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset
+ * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset.
*/
static inline void Endpoint_ResetFIFO(uint8_t EndpointNumber);
@@ -230,7 +230,7 @@
/** Determines if the currently selected endpoint is enabled, but not necessarily configured.
*
- * \return Boolean True if the currently selected endpoint is enabled, false otherwise
+ * \return Boolean True if the currently selected endpoint is enabled, false otherwise.
*/
static inline bool Endpoint_IsEnabled(void);
@@ -242,13 +242,13 @@
*
* \ingroup Group_EndpointPacketManagement
*
- * \return Boolean true if the currently selected endpoint may be read from or written to, depending on its direction
+ * \return Boolean true if the currently selected endpoint may be read from or written to, depending on its direction.
*/
static inline bool Endpoint_IsReadWriteAllowed(void);
/** Determines if the currently selected endpoint is configured.
*
- * \return Boolean true if the currently selected endpoint has been configured, false otherwise
+ * \return Boolean true if the currently selected endpoint has been configured, false otherwise.
*/
static inline bool Endpoint_IsConfigured(void);
@@ -256,16 +256,16 @@
* interrupt duration has elapsed. Which endpoints have interrupted can be determined by
* masking the return value against (1 << {Endpoint Number}).
*
- * \return Mask whose bits indicate which endpoints have interrupted
+ * \return Mask whose bits indicate which endpoints have interrupted.
*/
static inline uint8_t Endpoint_GetEndpointInterrupts(void);
/** Determines if the specified endpoint number has interrupted (valid only for INTERRUPT type
* endpoints).
*
- * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested
+ * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested.
*
- * \return Boolean true if the specified endpoint has interrupted, false otherwise
+ * \return Boolean true if the specified endpoint has interrupted, false otherwise.
*/
static inline bool Endpoint_HasEndpointInterrupted(uint8_t EndpointNumber);
@@ -339,7 +339,7 @@
*
* \ingroup Group_EndpointPacketManagement
*
- * \return Boolean true if the currently selected endpoint is stalled, false otherwise
+ * \return Boolean true if the currently selected endpoint is stalled, false otherwise.
*/
static inline bool Endpoint_IsStalled(void);
@@ -501,7 +501,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \return Next byte in the currently selected endpoint's FIFO buffer
+ * \return Next byte in the currently selected endpoint's FIFO buffer.
*/
static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Endpoint_Read_Byte(void)
@@ -513,7 +513,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \param[in] Byte Next byte to write into the the currently selected endpoint's FIFO buffer
+ * \param[in] Byte Next byte to write into the the currently selected endpoint's FIFO buffer.
*/
static inline void Endpoint_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Write_Byte(const uint8_t Byte)
@@ -538,7 +538,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \return Next word in the currently selected endpoint's FIFO buffer
+ * \return Next word in the currently selected endpoint's FIFO buffer.
*/
static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t Endpoint_Read_Word_LE(void)
@@ -560,7 +560,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \return Next word in the currently selected endpoint's FIFO buffer
+ * \return Next word in the currently selected endpoint's FIFO buffer.
*/
static inline uint16_t Endpoint_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t Endpoint_Read_Word_BE(void)
@@ -582,7 +582,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer
+ * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer.
*/
static inline void Endpoint_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Write_Word_LE(const uint16_t Word)
@@ -596,7 +596,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer
+ * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer.
*/
static inline void Endpoint_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Write_Word_BE(const uint16_t Word)
@@ -623,7 +623,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \return Next double word in the currently selected endpoint's FIFO buffer
+ * \return Next double word in the currently selected endpoint's FIFO buffer.
*/
static inline uint32_t Endpoint_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint32_t Endpoint_Read_DWord_LE(void)
@@ -647,7 +647,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \return Next double word in the currently selected endpoint's FIFO buffer
+ * \return Next double word in the currently selected endpoint's FIFO buffer.
*/
static inline uint32_t Endpoint_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint32_t Endpoint_Read_DWord_BE(void)
@@ -671,7 +671,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer
+ * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer.
*/
static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Write_DWord_LE(const uint32_t DWord)
@@ -687,7 +687,7 @@
*
* \ingroup Group_EndpointPrimitiveRW
*
- * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer
+ * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer.
*/
static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Write_DWord_BE(const uint32_t DWord)
@@ -763,7 +763,7 @@
* \note This routine will select the specified endpoint, and the endpoint will remain selected
* once the routine completes regardless of if the endpoint configuration succeeds.
*
- * \return Boolean true if the configuration succeeded, false otherwise
+ * \return Boolean true if the configuration succeeded, false otherwise.
*/
bool Endpoint_ConfigureEndpoint(const uint8_t Number, const uint8_t Type, const uint8_t Direction,
const uint16_t Size, const uint8_t Banks);
@@ -801,7 +801,7 @@
* \ingroup Group_EndpointStreamRW
*
* \param[in] Length Number of bytes to send via the currently selected endpoint.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -824,7 +824,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -836,7 +836,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -850,7 +850,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -873,7 +873,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -885,7 +885,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -899,7 +899,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -922,7 +922,7 @@
*
* \param[out] Buffer Pointer to the destination data buffer to write to.
* \param[in] Length Number of bytes to send via the currently selected endpoint.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -934,7 +934,7 @@
*
* \param[out] Buffer Pointer to the destination data buffer to write to, located in EEPROM memory space.
* \param[in] Length Number of bytes to send via the currently selected endpoint.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -957,7 +957,7 @@
*
* \param[out] Buffer Pointer to the destination data buffer to write to.
* \param[in] Length Number of bytes to send via the currently selected endpoint.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
@@ -969,7 +969,7 @@
*
* \param[out] Buffer Pointer to the destination data buffer to write to, located in EEPROM memory space.
* \param[in] Length Number of bytes to send via the currently selected endpoint.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h
index 736ed87cf..04d702eea 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.h
+++ b/LUFA/Drivers/USB/LowLevel/Host.h
@@ -134,21 +134,21 @@
* 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.
*
- * \return Boolean true if the bus is currently suspended, false otherwise
+ * \return Boolean true if the bus is currently suspended, false otherwise.
*/
static inline bool USB_Host_IsBusSuspended(void);
/** Determines if the attached device is currently enumerated in Full Speed mode (12Mb/s), or
* false if the attached device is enumerated in Low Speed mode (1.5Mb/s).
*
- * \return Boolean true if the attached device is enumerated in Full Speed mode, false otherwise
+ * \return Boolean true if the attached device is enumerated in Full Speed mode, false otherwise.
*/
static inline bool USB_Host_IsDeviceFullSpeed(void);
/** Determines if the attached device is currently issuing a Remote Wakeup request, requesting
* that the host resume the USB bus and wake up the device, false otherwise.
*
- * \return Boolean true if the attached device has sent a Remote Wakeup request, false otherwise
+ * \return Boolean true if the attached device has sent a Remote Wakeup request, false otherwise.
*/
static inline bool USB_Host_IsRemoteWakeupSent(void);
@@ -164,7 +164,7 @@
/** Determines if a resume from Remote Wakeup request is currently being sent to an attached
* device.
*
- * \return Boolean true if no resume request is currently being sent, false otherwise
+ * \return Boolean true if no resume request is currently being sent, false otherwise.
*/
static inline bool USB_Host_IsResumeFromWakeupRequestSent(void);
#else
@@ -196,7 +196,7 @@
*
* \note After this routine returns, the control pipe will be selected.
*
- * \param[in] ConfigNumber Configuration index to send to the device
+ * \param[in] ConfigNumber Configuration index to send to the device.
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
@@ -209,7 +209,7 @@
* \note After this routine returns, the control pipe will be selected.
*
* \param[out] DeviceDescriptorPtr Pointer to the destination device descriptor structure where
- * the read data is to be stored
+ * the read data is to be stored.
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
@@ -222,10 +222,10 @@
*
* \note After this routine returns, the control pipe will be selected.
*
- * \param[in] Index Index of the string index to retrieve
+ * \param[in] Index Index of the string index to retrieve.
* \param[out] Buffer Pointer to the destination buffer where the retrieved string descriptor is
- * to be stored
- * \param[in] BufferLength Maximum size of the string descriptor which can be stored into the buffer
+ * to be stored.
+ * \param[in] BufferLength Maximum size of the string descriptor which can be stored into the buffer.
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
@@ -235,7 +235,7 @@
*
* \note After this routine returns, the control pipe will be selected.
*
- * \param[in] EndpointIndex Index of the endpoint to clear
+ * \param[in] EndpointIndex Index of the endpoint to clear.
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
diff --git a/LUFA/Drivers/USB/LowLevel/OTG.h b/LUFA/Drivers/USB/LowLevel/OTG.h
index 944fd72ac..021899803 100644
--- a/LUFA/Drivers/USB/LowLevel/OTG.h
+++ b/LUFA/Drivers/USB/LowLevel/OTG.h
@@ -66,13 +66,13 @@
/* Macros: */
/** Mask for the VBUS pulsing method of SRP, supported by some OTG devices.
*
- * \see USB_OTG_DEV_Initiate_SRP()
+ * \see \ref USB_OTG_Device_InitiateSRP().
*/
#define USB_OTG_SRP_VBUS (1 << SRPSEL)
/** Mask for the Data + pulsing method of SRP, supported by some OTG devices.
*
- * \see USB_OTG_DEV_Initiate_SRP()
+ * \see \ref USB_OTG_Device_InitiateSRP().
*/
#define USB_OTG_STP_DATA 0
@@ -94,6 +94,18 @@
*/
static inline bool USB_OTG_Device_IsSendingHNP(void);
+ /** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB
+ * interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in
+ * host mode indicates that VBUS should be applied and a session started.
+ *
+ * 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[in] 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_Device_InitiateSRP(uint8_t SRPTypeMask);
+
/** Accepts a HNP from a connected device, indicating that both devices should exchange
* device/host roles.
*/
@@ -109,17 +121,6 @@
* \return Boolean true if a HNP is currently being issued by the connected device, false otherwise.
*/
static inline bool USB_OTG_Host_IsHNPReceived(void);
-
- /** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB
- * interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in
- * host mode indicates that VBUS should be applied and a session started.
- *
- * 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[in] 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_InitiateSRP(uint8_t SRPTypeMask);
#else
#define USB_OTG_Device_RequestHNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
@@ -127,13 +128,13 @@
#define USB_OTG_Device_IsSendingHNP() ((OTGCON & (1 << HNPREQ)) ? true : false)
+ #define USB_OTG_Device_InitiateSRP(type) MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | ((type) | (1 << SRPREQ))); }MACROE
+
#define USB_OTG_Host_AcceptHNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
#define USB_OTG_Host_RejectHNP() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
- #define USB_OTG_Host_IsHNPReceived() ((OTGCON & (1 << HNPREQ)) ? true : false)
-
- #define USB_OTG_Device_InitiateSRP(type) MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | ((type) | (1 << SRPREQ))); }MACROE
+ #define USB_OTG_Host_IsHNPReceived() ((OTGCON & (1 << HNPREQ)) ? true : false)
#endif
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index 7283fc820..05e393ec8 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -204,27 +204,27 @@
*
* \ingroup Group_PipeRW
*
- * \return Total number of bytes in the currently selected Pipe's FIFO buffer
+ * \return Total number of bytes in the currently selected Pipe's FIFO buffer.
*/
static inline uint16_t Pipe_BytesInPipe(void);
/** Returns the pipe address of the currently selected pipe. This is typically used to save the
* currently selected pipe number so that it can be restored after another pipe has been manipulated.
*
- * \return Index of the currently selected pipe
+ * \return Index of the currently selected pipe.
*/
static inline uint8_t Pipe_GetCurrentPipe(void);
/** Selects the given pipe number. Any pipe operations which do not require the pipe number to be
* indicated will operate on the currently selected pipe.
*
- * \param[in] PipeNumber Index of the pipe to select
+ * \param[in] PipeNumber Index of the pipe to select.
*/
static inline void Pipe_SelectPipe(uint8_t PipeNumber);
/** Resets the desired pipe, including the pipe banks and flags.
*
- * \param[in] PipeNumber Index of the pipe to reset
+ * \param[in] PipeNumber Index of the pipe to reset.
*/
static inline void Pipe_ResetPipe(uint8_t PipeNumber);
@@ -242,13 +242,13 @@
/** Determines if the currently selected pipe is enabled, but not necessarily configured.
*
- * \return Boolean True if the currently selected pipe is enabled, false otherwise
+ * \return Boolean True if the currently selected pipe is enabled, false otherwise.
*/
static inline bool Pipe_IsEnabled(void);
/** Gets the current pipe token, indicating the pipe's data direction and type.
*
- * \return The current pipe token, as a PIPE_TOKEN_* mask
+ * \return The current pipe token, as a PIPE_TOKEN_* mask.
*/
static inline uint8_t Pipe_GetPipeToken(void);
@@ -257,7 +257,7 @@
* control requests, or on regular pipes to allow for half-duplex bidirectional data transfer to devices
* which have two endpoints of opposite direction sharing the same endpoint address within the device.
*
- * \param[in] Token New pipe token to set the selected pipe to, as a PIPE_TOKEN_* mask
+ * \param[in] Token New pipe token to set the selected pipe to, as a PIPE_TOKEN_* mask.
*/
static inline void Pipe_SetPipeToken(uint8_t Token);
@@ -267,42 +267,42 @@
/** Configures the currently selected pipe to only allow the specified number of IN requests to be
* accepted by the pipe before it is automatically frozen.
*
- * \param[in] TotalINRequests Total number of IN requests that the pipe may receive before freezing
+ * \param[in] TotalINRequests Total number of IN requests that the pipe may receive before freezing.
*/
static inline void Pipe_SetFiniteINRequests(uint8_t TotalINRequests);
/** Determines if the currently selected pipe is configured.
*
- * \return Boolean true if the selected pipe is configured, false otherwise
+ * \return Boolean true if the selected pipe is configured, false otherwise.
*/
static inline bool Pipe_IsConfigured(void);
/** Retrieves the endpoint number of the endpoint within the attached device that the currently selected
* pipe is bound to.
*
- * \return Endpoint number the currently selected pipe is bound to
+ * \return Endpoint number the currently selected pipe is bound to.
*/
static inline uint8_t Pipe_BoundEndpointNumber(void);
/** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds.
*
- * \param[in] Milliseconds Number of milliseconds between each pipe poll
+ * \param[in] Milliseconds Number of milliseconds between each pipe poll.
*/
static inline void Pipe_SetInterruptPeriod(uint8_t Milliseconds);
/** Returns a mask indicating which pipe's interrupt periods have elapsed, indicating that the pipe should
* be serviced.
*
- * \return Mask whose bits indicate which pipes have interrupted
+ * \return Mask whose bits indicate which pipes have interrupted.
*/
static inline uint8_t Pipe_GetPipeInterrupts(void);
/** Determines if the specified pipe number has interrupted (valid only for INTERRUPT type
* pipes).
*
- * \param[in] PipeNumber Index of the pipe whose interrupt flag should be tested
+ * \param[in] PipeNumber Index of the pipe whose interrupt flag should be tested.
*
- * \return Boolean true if the specified pipe has interrupted, false otherwise
+ * \return Boolean true if the specified pipe has interrupted, false otherwise.
*/
static inline bool Pipe_HasPipeInterrupted(uint8_t PipeNumber);
@@ -314,7 +314,7 @@
/** Determines if the currently selected pipe is frozen, and not able to accept data.
*
- * \return Boolean true if the currently selected pipe is frozen, false otherwise
+ * \return Boolean true if the currently selected pipe is frozen, false otherwise.
*/
static inline bool Pipe_IsFrozen(void);
@@ -326,7 +326,7 @@
*
* \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
+ * \return Boolean true if an error has occurred on the selected pipe, false otherwise.
*/
static inline bool Pipe_IsError(void);
@@ -338,7 +338,7 @@
/** Gets a mask of the hardware error flags which have occurred on the currently selected pipe. This
* value can then be masked against the PIPE_ERRORFLAG_* masks to determine what error has occurred.
*
- * \return Mask comprising of PIPE_ERRORFLAG_* bits indicating what error has occurred on the selected pipe
+ * \return Mask comprising of PIPE_ERRORFLAG_* bits indicating what error has occurred on the selected pipe.
*/
static inline uint8_t Pipe_GetErrorFlags(void);
@@ -352,7 +352,7 @@
*
* \ingroup Group_PipePacketManagement
*
- * \return Boolean true if the currently selected pipe may be read from or written to, depending on its direction
+ * \return Boolean true if the currently selected pipe may be read from or written to, depending on its direction.
*/
static inline bool Pipe_IsReadWriteAllowed(void);
@@ -409,7 +409,7 @@
*
* \ingroup Group_PipePacketManagement
*
- * \return Boolean true if an NAK has been received on the current pipe, false otherwise
+ * \return Boolean true if an NAK has been received on the current pipe, false otherwise.
*/
static inline bool Pipe_IsNAKReceived(void);
@@ -425,7 +425,7 @@
*
* \ingroup Group_PipePacketManagement
*
- * \return Boolean true if the current pipe has been stalled by the attached device, false otherwise
+ * \return Boolean true if the current pipe has been stalled by the attached device, false otherwise.
*/
static inline bool Pipe_IsStalled(void);
@@ -509,13 +509,13 @@
#endif
/* Enums: */
- /** Enum for the possible error return codes of the Pipe_WaitUntilReady function
+ /** Enum for the possible error return codes of the Pipe_WaitUntilReady function.
*
* \ingroup Group_PipeRW
*/
enum Pipe_WaitUntilReady_ErrorCodes_t
{
- PIPE_READYWAIT_NoError = 0, /**< Pipe ready for next packet, no error */
+ PIPE_READYWAIT_NoError = 0, /**< Pipe ready for next packet, no error. */
PIPE_READYWAIT_PipeStalled = 1, /**< The device stalled the pipe while waiting. */
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
@@ -549,7 +549,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \return Next byte in the currently selected pipe's FIFO buffer
+ * \return Next byte in the currently selected pipe's FIFO buffer.
*/
static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_Read_Byte(void)
@@ -561,7 +561,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \param[in] Byte Next byte to write into the the currently selected pipe's FIFO buffer
+ * \param[in] Byte Next byte to write into the the currently selected pipe's FIFO buffer.
*/
static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline void Pipe_Write_Byte(const uint8_t Byte)
@@ -586,7 +586,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \return Next word in the currently selected pipe's FIFO buffer
+ * \return Next word in the currently selected pipe's FIFO buffer.
*/
static inline uint16_t Pipe_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t Pipe_Read_Word_LE(void)
@@ -608,7 +608,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \return Next word in the currently selected pipe's FIFO buffer
+ * \return Next word in the currently selected pipe's FIFO buffer.
*/
static inline uint16_t Pipe_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t Pipe_Read_Word_BE(void)
@@ -630,7 +630,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer
+ * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer.
*/
static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;
static inline void Pipe_Write_Word_LE(const uint16_t Word)
@@ -644,7 +644,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer
+ * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer.
*/
static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;
static inline void Pipe_Write_Word_BE(const uint16_t Word)
@@ -671,7 +671,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \return Next double word in the currently selected pipe's FIFO buffer
+ * \return Next double word in the currently selected pipe's FIFO buffer.
*/
static inline uint32_t Pipe_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint32_t Pipe_Read_DWord_LE(void)
@@ -695,7 +695,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \return Next double word in the currently selected pipe's FIFO buffer
+ * \return Next double word in the currently selected pipe's FIFO buffer.
*/
static inline uint32_t Pipe_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint32_t Pipe_Read_DWord_BE(void)
@@ -719,7 +719,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer
+ * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer.
*/
static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
static inline void Pipe_Write_DWord_LE(const uint32_t DWord)
@@ -735,7 +735,7 @@
*
* \ingroup Group_PipePrimitiveRW
*
- * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer
+ * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer.
*/
static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
static inline void Pipe_Write_DWord_BE(const uint32_t DWord)
@@ -806,7 +806,7 @@
* \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.
*
- * \return Boolean true if the configuration is successful, false otherwise
+ * \return Boolean true if the configuration is successful, false otherwise.
*/
bool Pipe_ConfigurePipe(const uint8_t Number, const uint8_t Type, const uint8_t Token, const uint8_t EndpointNumber,
const uint16_t Size, const uint8_t Banks);
@@ -823,10 +823,10 @@
/** Determines if a pipe has been bound to the given device endpoint address. If a pipe which is bound to the given
* endpoint is found, it is automatically selected.
*
- * \param[in] EndpointAddress Address and direction mask of the endpoint within the attached device to check
+ * \param[in] EndpointAddress Address and direction mask of the endpoint within the attached device to check.
*
* \return Boolean true if a pipe bound to the given endpoint address of the specified direction is found, false
- * otherwise
+ * otherwise.
*/
bool Pipe_IsEndpointBound(const uint8_t EndpointAddress);
@@ -846,7 +846,7 @@
* \ingroup Group_PipeStreamRW
*
* \param[in] Length Number of bytes to send via the currently selected pipe.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -869,7 +869,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected pipe into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -881,7 +881,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected pipe into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -895,7 +895,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected pipe into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -918,7 +918,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected pipe into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -930,7 +930,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected pipe into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -944,7 +944,7 @@
*
* \param[in] Buffer Pointer to the source data buffer to read from.
* \param[in] Length Number of bytes to read for the currently selected pipe into the buffer.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -967,7 +967,7 @@
*
* \param[out] Buffer Pointer to the source data buffer to write to.
* \param[in] Length Number of bytes to read for the currently selected pipe to read from.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -979,7 +979,7 @@
*
* \param[out] Buffer Pointer to the source data buffer to write to.
* \param[in] Length Number of bytes to read for the currently selected pipe to read from.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -1002,7 +1002,7 @@
*
* \param[out] Buffer Pointer to the source data buffer to write to.
* \param[in] Length Number of bytes to read for the currently selected pipe to read from.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
@@ -1014,7 +1014,7 @@
*
* \param[out] Buffer Pointer to the source data buffer to write to.
* \param[in] Length Number of bytes to read for the currently selected pipe to read from.
- * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback
+ * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback.
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/