Minor XMEGA USB driver fixes.
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 13 Dec 2011 03:40:51 +0000 (03:40 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 13 Dec 2011 03:40:51 +0000 (03:40 +0000)
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h

index 23c1520..c301cc3 100644 (file)
@@ -56,7 +56,7 @@ bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Number,
        USB_Endpoint_SelectedHandle->STATUS  = (Direction == ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
        USB_Endpoint_SelectedHandle->CTRL    = Config;
        USB_Endpoint_SelectedHandle->CNT     = 0;
        USB_Endpoint_SelectedHandle->STATUS  = (Direction == ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
        USB_Endpoint_SelectedHandle->CTRL    = Config;
        USB_Endpoint_SelectedHandle->CNT     = 0;
-       USB_Endpoint_SelectedHandle->DATAPTR = (intptr_t)&USB_Endpoint_SelectedFIFO->Data[0];
+       USB_Endpoint_SelectedHandle->DATAPTR = (intptr_t)USB_Endpoint_SelectedFIFO->Data;
        
        USB_Endpoint_SelectedFIFO->Length    = (Direction == ENDPOINT_DIR_IN) ? Size : 0;
        USB_Endpoint_SelectedFIFO->Position  = 0;
        
        USB_Endpoint_SelectedFIFO->Length    = (Direction == ENDPOINT_DIR_IN) ? Size : 0;
        USB_Endpoint_SelectedFIFO->Position  = 0;
index f587fec..2d4d7be 100644 (file)
                                
                                if ((USB_Endpoint_SelectedHandle->CTRL & USB_EP_TYPE_gm) == USB_EP_TYPE_CONTROL_gc)
                                {
                                
                                if ((USB_Endpoint_SelectedHandle->CTRL & USB_EP_TYPE_gm) == USB_EP_TYPE_CONTROL_gc)
                                {
-                                       Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint  ENDPOINT_DIR_IN);
+                                       Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint ^ ENDPOINT_DIR_IN);
                                        USB_Endpoint_SelectedHandle->CTRL |= USB_EP_STALL_bm;
                                        USB_Endpoint_SelectedHandle->CTRL |= USB_EP_STALL_bm;
-                                       Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint & ~ENDPOINT_DIR_IN);
                                }
                        }
 
                                }
                        }
 
                                return (USB_Endpoint_SelectedEndpoint & ENDPOINT_DIR_IN);
                        }
 
                                return (USB_Endpoint_SelectedEndpoint & ENDPOINT_DIR_IN);
                        }
 
-                       /** Sets the direction of the currently selected endpoint.
-                        *
-                        *  \param[in] DirectionMask  New endpoint direction, as a \c ENDPOINT_DIR_* mask.
-                        */
-                       static inline void Endpoint_SetEndpointDirection(const uint8_t DirectionMask) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_SetEndpointDirection(const uint8_t DirectionMask)
-                       {
-                               // TODO
-                       }
-
                        /** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_XMEGA
                        /** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_XMEGA