Fix UC3B architecture compile errors and ensure the architecture can be compiled...
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 5 Mar 2011 16:36:57 +0000 (16:36 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 5 Mar 2011 16:36:57 +0000 (16:36 +0000)
LUFA/Common/Common.h
LUFA/Drivers/USB/Core/UC3B/Pipe_UC3B.c
LUFA/Drivers/USB/Core/UC3B/Pipe_UC3B.h

index 147ae8e..da4b1dd 100644 (file)
                        #define _delay_ms(x)
                        #define memcmp_P(...)            memcmp(__VA_ARGS__)
                        #define memcpy_P(...)            memcpy(__VA_ARGS__)
+                       
+                       #define USE_RAM_DESCRIPTORS
                #endif
 
        /* Public Interface - May be used in end-application: */
index 51f4d5e..d20926a 100644 (file)
@@ -56,7 +56,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
                                        ((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
+       USB_PipeFIFOPos[Number]      = &AVR32_USBB_SLAVE[Number * 0x10000];\r
 \r
        Pipe_SetInfiniteINRequests();\r
 \r
@@ -70,7 +70,7 @@ void Pipe_ClearPipes(void)
                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
+               USB_PipeFIFOPos[PNum]         = &AVR32_USBB_SLAVE[PNum * 0x10000];\r
                Pipe_DisablePipe();\r
        }\r
 }\r
index 173b199..ee0b165 100644 (file)
                        {\r
                                AVR32_USBB.uprst |=  (AVR32_USBB_PRST0_MASK << PipeNumber);\r
                                AVR32_USBB.uprst &= ~(AVR32_USBB_PRST0_MASK << PipeNumber);\r
-                               USB_PipeFIFOPos[Pipe_SelectedPipe] = &AVR32_USBB_SLAVE[Pipe_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
                        }\r
 \r
                        /** Enables the currently selected pipe so that data can be sent and received through it to and from\r
                        static inline void Pipe_ClearSETUP(void)\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].txstpic = true;\r
-                               USB_PipeFIFOPos[Pipe_SelectedPipe] = &AVR32_USBB_SLAVE[Pipe_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
                        }\r
 \r
                        /** Acknowledges the reception of a setup IN request from the attached device on the currently selected\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].rxinic   = true;\r
                                (&AVR32_USBB.UPCON0CLR)[USB_SelectedPipe].fifoconc = true;\r
-                               USB_PipeFIFOPos[Pipe_SelectedPipe] = &AVR32_USBB_SLAVE[Pipe_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
                        }\r
 \r
                        /** Sends the currently selected pipe's contents to the device as an OUT packet on the selected pipe, freeing\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].txoutic  = true;\r
                                (&AVR32_USBB.UPCON0CLR)[USB_SelectedPipe].fifoconc = true;\r
-                               USB_PipeFIFOPos[Pipe_SelectedPipe] = &AVR32_USBB_SLAVE[Pipe_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
                        }\r
 \r
                        /** Determines if the device sent a NAK (Negative Acknowledge) in response to the last sent packet on\r
                        static inline void Pipe_ClearStall(void)\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].rxstalldic = true;\r
-                               USB_PipeFIFOPos[Pipe_SelectedPipe] = &AVR32_USBB_SLAVE[Pipe_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
                        }\r
 \r
                        /** Reads one byte from the currently selected pipe's bank, for OUT direction pipes.\r