Renamed Projects/Unfinished to Projects/Incomplete for consistancy.
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Pipe.c
index 7d3e876..9c6a53e 100644 (file)
@@ -70,6 +70,22 @@ void Pipe_ClearPipes(void)
        }\r
 }\r
 \r
+bool Pipe_IsEndpointBound(uint8_t EndpointAddress)\r
+{\r
+       uint8_t PrevPipeNumber = Pipe_GetCurrentPipe();\r
+\r
+       for (uint8_t PNum = 0; PNum < PIPE_TOTAL_PIPES; PNum++)\r
+       {\r
+               Pipe_SelectPipe(PNum);\r
+               \r
+               if (Pipe_IsConfigured() && (Pipe_BoundEndpointNumber() == EndpointAddress))\r
+                 return true;\r
+       }\r
+       \r
+       Pipe_SelectPipe(PrevPipeNumber);\r
+       return false;\r
+}\r
+\r
 uint8_t Pipe_WaitUntilReady(void)\r
 {\r
        #if (USB_STREAM_TIMEOUT_MS < 0xFF)\r