#include "../Pipe.h"\r
\r
uint8_t USB_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;\r
+\r
volatile uint8_t USB_SelectedPipe = PIPE_CONTROLPIPE;\r
+volatile void* USB_PipeFIFOPos[PIPE_TOTAL_PIPES];\r
\r
bool Pipe_ConfigurePipe(const uint8_t Number,\r
const uint8_t Type,\r
\r
(&AVR32_USBB.upcfg0)[Number] = 0;\r
(&AVR32_USBB.upcfg0)[Number] = (AVR32_USBB_ALLOC_MASK |\r
- ((uint32_t)Type << AVR32_USBB_PTYPE_OFFSET) |\r
- ((uint32_t)Token << AVR32_USBB_PTOKEN_OFFSET) |\r
- ((uint32_t)Banks << AVR32_USBB_PBK_OFFSET) |\r
- ((EndpointNumber & PIPE_EPNUM_MASK) << AVR32_USBB_PEPNUM_OFFSET));\r
+ ((uint32_t)Type << AVR32_USBB_PTYPE_OFFSET) |\r
+ ((uint32_t)Token << AVR32_USBB_PTOKEN_OFFSET) |\r
+ ((uint32_t)Banks << AVR32_USBB_PBK_OFFSET) |\r
+ ((EndpointNumber & PIPE_EPNUM_MASK) << AVR32_USBB_PEPNUM_OFFSET));\r
+ USB_PipeFIFOPos[PNum] = &AVR32_USBB_SLAVE[PNum * 0x10000];\r
\r
Pipe_SetInfiniteINRequests();\r
\r
Pipe_SelectPipe(PNum);\r
(&AVR32_USBB.upcfg0)[PNum] = 0;\r
(&AVR32_USBB.upcon0clr)[PNum] = 0xFFFFFFFF;\r
+ USB_PipeFIFOPos[PNum] = &AVR32_USBB_SLAVE[EPNum * 0x10000];\r
Pipe_DisablePipe();\r
}\r
}\r