return (&AVR32_USBB.UPSTA0)[USB_SelectedPipe].cfgok;\r
}\r
\r
- /** Retrieves the endpoint number of the endpoint within the attached device that the currently selected\r
+ /** Retrieves the endpoint address of the endpoint within the attached device that the currently selected\r
* pipe is bound to.\r
*\r
- * \return Endpoint number the currently selected pipe is bound to.\r
+ * \return Endpoint address the currently selected pipe is bound to.\r
*/\r
- static inline uint8_t Pipe_BoundEndpointNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
- static inline uint8_t Pipe_BoundEndpointNumber(void)\r
+ static inline uint8_t Pipe_GetBoundEndpointAddress(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+ static inline uint8_t Pipe_GetBoundEndpointAddress(void)\r
{\r
- return (&AVR32_USBB.UPCFG0)[USB_SelectedPipe].pepnum;\r
+ return ((&AVR32_USBB.UPCFG0)[USB_SelectedPipe].pepnum |\r
+ ((Pipe_GetPipeToken() == PIPE_TOKEN_IN) ? ENDPOINT_DESCRIPTOR_DIR_IN : 0));\r
}\r
\r
/** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds.\r