Move LUFA compile time options to a new section in the application makefiles for...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Pipe.c
index 71a33d6..189aaa6 100644 (file)
@@ -45,7 +45,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number, const uint8_t Type, const uint8_t
 \r
        UPCFG1X = 0;\r
        \r
-       UPCFG0X = ((Type << EPTYPE0) | Token | (EndpointNumber << PEPNUM0));\r
+       UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));\r
        UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));\r
 \r
        return Pipe_IsConfigured();\r
@@ -76,8 +76,6 @@ uint8_t Pipe_WaitUntilReady(void)
        uint16_t TimeoutMSRem = USB_STREAM_TIMEOUT_MS;\r
        #endif\r
 \r
-       USB_INT_Clear(USB_INT_HSOFI);\r
-\r
        for (;;)\r
        {\r
                if (Pipe_GetPipeToken() == PIPE_TOKEN_IN)\r