aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-10-30 12:06:02 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-10-30 12:06:02 +0000
commitb714ffbfa097f2ac737f4210e818297503c3fe7e (patch)
tree26b4b405c59b79adca83ded0e5d7544e910707bd /LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
parentc73997429271e8566080ac8fdf21e5944c3b4c8e (diff)
downloadlufa-b714ffbfa097f2ac737f4210e818297503c3fe7e.tar.gz
lufa-b714ffbfa097f2ac737f4210e818297503c3fe7e.tar.bz2
lufa-b714ffbfa097f2ac737f4210e818297503c3fe7e.zip
Update XMEGA clock management so that the correct 16-bit calibration is used when requested. Fix endpoint descriptor table so that the frame number is stored into the correct location. Add compile time option to source the USB clock from the PLL rather than the internal 32MHz RC oscillator.
Diffstat (limited to 'LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h')
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
index 3fbd3ff2f..0667f6704 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
@@ -231,8 +231,10 @@
((EndpointNumber & ENDPOINT_DIR_IN) ? 0x01 : 0);
Endpoint_SelectedEndpoint = EndpointNumber;
- Endpoint_SelectedEndpointHandle = &((USB_EP_t*)&USB_EndpointTable.Endpoints)[EPTableIndex];
Endpoint_SelectedEndpointAux = &Endpoint_AuxData[EPTableIndex];
+ Endpoint_SelectedEndpointHandle = (EndpointNumber & ENDPOINT_DIR_IN) ?
+ &USB_EndpointTable.Endpoints[EndpointNumber & ENDPOINT_EPNUM_MASK].IN :
+ &USB_EndpointTable.Endpoints[EndpointNumber & ENDPOINT_EPNUM_MASK].OUT;
}
/** Configures the specified endpoint number with the given endpoint type, direction, bank size