aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-06-08 02:45:32 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-06-08 02:45:32 +0000
commit0bf5064aec5ac43ba2b25d44528bebb27db2f117 (patch)
treeee5e186bc1a7121e57dd2f37faf9f43b076b2aa5 /LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
parent34164a5550911277db03bbbc2a604bc59e0bbc99 (diff)
downloadlufa-0bf5064aec5ac43ba2b25d44528bebb27db2f117.tar.gz
lufa-0bf5064aec5ac43ba2b25d44528bebb27db2f117.tar.bz2
lufa-0bf5064aec5ac43ba2b25d44528bebb27db2f117.zip
Pipe_BoundEndpointNumber() has been renamed to Pipe_GetBoundEndpointAddress(), and now returns the correct endpoint direction as part of the endpoint address.
Add Audio_GetSetEndpointProperty() function to the Host mode Audio class driver.
Diffstat (limited to 'LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h')
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
index c10518548..459423c12 100644
--- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
@@ -332,15 +332,16 @@
return (&AVR32_USBB.UPSTA0)[USB_SelectedPipe].cfgok;
}
- /** Retrieves the endpoint number of the endpoint within the attached device that the currently selected
+ /** Retrieves the endpoint address 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 address the currently selected pipe is bound to.
*/
- static inline uint8_t Pipe_BoundEndpointNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline uint8_t Pipe_BoundEndpointNumber(void)
+ static inline uint8_t Pipe_GetBoundEndpointAddress(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline uint8_t Pipe_GetBoundEndpointAddress(void)
{
- return (&AVR32_USBB.UPCFG0)[USB_SelectedPipe].pepnum;
+ return ((&AVR32_USBB.UPCFG0)[USB_SelectedPipe].pepnum |
+ ((Pipe_GetPipeToken() == PIPE_TOKEN_IN) ? ENDPOINT_DESCRIPTOR_DIR_IN : 0));
}
/** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds.