Add support for the Atmel XMEGA A3BU Xplained board.

More XMEGA USB core fixes.
This commit is contained in:
Dean Camera 2011-10-31 03:31:00 +00:00
parent 0304916356
commit 00ad509061
9 changed files with 252 additions and 7 deletions

View file

@ -107,8 +107,16 @@ uint8_t Endpoint_WaitUntilReady(void)
for (;;)
{
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
if (Endpoint_GetEndpointDirection() == ENDPOINT_DIR_IN)
{
if (Endpoint_IsINReady())
return ENDPOINT_READYWAIT_NoError;
}
else
{
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
uint8_t USB_DeviceState_LCL = USB_DeviceState;

View file

@ -305,7 +305,7 @@
}
if (Type == EP_TYPE_CONTROL)
Endpoint_ConfigureEndpoint_PRV(Number, Direction ^ ENDPOINT_DIR_IN, EPConfigMask, Size);
Endpoint_ConfigureEndpoint_PRV(Number, (Direction ^ ENDPOINT_DIR_IN), EPConfigMask, Size);
return Endpoint_ConfigureEndpoint_PRV(Number, Direction, EPConfigMask, Size);
}
@ -367,7 +367,7 @@
*/
static inline void Endpoint_AbortPendingIN(void)
{
// TODO
USB_Endpoint_SelectedHandle->STATUS |= USB_EP_BUSNACK0_bm;
}
/** Determines if the currently selected endpoint may be read from (if data is waiting in the endpoint
@ -581,7 +581,7 @@
static inline uint8_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Endpoint_GetEndpointDirection(void)
{
return ((USB_Endpoint_SelectedEndpoint & ENDPOINT_DIR_IN) ? true : false);
return (USB_Endpoint_SelectedEndpoint & ENDPOINT_DIR_IN);
}
/** Sets the direction of the currently selected endpoint.