diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-24 07:28:51 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-24 07:28:51 +0000 |
commit | a504a3a010ec2441dda0209f195492fb36e7c97b (patch) | |
tree | 878acffb3679796597b9e0bd94a322f2cb074819 /LUFA/Drivers/USB/LowLevel/Endpoint.c | |
parent | c20a94a4e84c89debf5e7109482ede708a694a0c (diff) | |
download | lufa-a504a3a010ec2441dda0209f195492fb36e7c97b.tar.gz lufa-a504a3a010ec2441dda0209f195492fb36e7c97b.tar.bz2 lufa-a504a3a010ec2441dda0209f195492fb36e7c97b.zip |
Endpoint configuration is now refined to give better output when all configurations have static inputs - removed the now useless STATIC_ENDPOINT_CONFIGURATION compile time token.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Endpoint.c')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Endpoint.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.c b/LUFA/Drivers/USB/LowLevel/Endpoint.c index da2925ec7..4615baa69 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.c +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.c @@ -39,22 +39,12 @@ uint8_t USB_ControlEndpointSize = ENDPOINT_CONTROLEP_DEFAULT_SIZE;
#endif
-#if !defined(STATIC_ENDPOINT_CONFIGURATION)
-bool Endpoint_ConfigureEndpoint(const uint8_t Number, const uint8_t Type, const uint8_t Direction,
- const uint16_t Size, const uint8_t Banks)
+uint8_t Endpoint_BytesToEPSizeMaskDynamic(const uint16_t Size)
{
- Endpoint_SelectEndpoint(Number);
- Endpoint_EnableEndpoint();
-
- UECFG1X = 0;
-
- UECFG0X = ((Type << EPTYPE0) | Direction);
- UECFG1X = ((1 << ALLOC) | Banks | Endpoint_BytesToEPSizeMask(Size));
-
- return Endpoint_IsConfigured();
+ return Endpoint_BytesToEPSizeMask(Size);
}
-#else
-bool Endpoint_ConfigureEndpointStatic(const uint8_t Number, const uint8_t UECFG0XData, const uint8_t UECFG1XData)
+
+bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number, const uint8_t UECFG0XData, const uint8_t UECFG1XData)
{
Endpoint_SelectEndpoint(Number);
Endpoint_EnableEndpoint();
@@ -66,7 +56,6 @@ bool Endpoint_ConfigureEndpointStatic(const uint8_t Number, const uint8_t UECFG0 return Endpoint_IsConfigured();
}
-#endif
void Endpoint_ClearEndpoints(void)
{
|