aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel/Pipe.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-02-01 01:27:00 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-02-01 01:27:00 +0000
commitb6a4584a19e81c2e1f909355bbc64c2b8cea84f6 (patch)
tree3e5388a85cea77702c24478245097138c7bf704c /LUFA/Drivers/USB/LowLevel/Pipe.h
parentbb1a036f097602a70ce219915db28dea616b76a8 (diff)
downloadlufa-b6a4584a19e81c2e1f909355bbc64c2b8cea84f6.tar.gz
lufa-b6a4584a19e81c2e1f909355bbc64c2b8cea84f6.tar.bz2
lufa-b6a4584a19e81c2e1f909355bbc64c2b8cea84f6.zip
Fixed Pipe_IsEndpointBound() function not taking the endpoint's direction into account.
Re-added Pipe_IsEndpointBound() calls to the CDC and RNDIS host class drivers, not that the function has the correct behaviour for devices with bidirectional endpoints.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Pipe.h')
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index afae6bcfb..16b5ea670 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -175,6 +175,11 @@
*/
#define PIPE_EPNUM_MASK 0x0F
+ /** Endpoint direction mask, for masking against endpoint addresses to retrieve the endpoint's
+ * direction for comparing with the ENDPOINT_DESCRIPTOR_DIR_* masks.
+ */
+ #define PIPE_EPDIR_MASK 0x80
+
/* Pseudo-Function Macros: */
#if defined(__DOXYGEN__)
/** Indicates the number of bytes currently stored in the current pipes's selected bank.
@@ -805,9 +810,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 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 is found, false otherwise
+ * \return Boolean true if a pipe bound to the given endpoint address of the specified direction is found, false
+ * otherwise
*/
bool Pipe_IsEndpointBound(const uint8_t EndpointAddress);