Move LUFA compile time options to a new section in the application makefiles for...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Pipe.c
index 3c493fe..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