X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f29fc1abc40dd862689ca8765e244c1212742744..d11ed10c5314c44dc01c06954d1d73d4894cbff8:/LUFA/Drivers/USB/LowLevel/Endpoint.h diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index 5bbbb87b5..ff0b640a4 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, provided that the above copyright notice appear in all - copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -338,9 +338,11 @@ */ static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask); #else - #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__) + #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) #define Endpoint_BytesInEndpoint() UEBCX - #else + #elif defined(USB_SERIES_4_AVR) + #define Endpoint_BytesInEndpoint() (((uint16_t)UEBCHX << 8) | UEBCLX) + #elif defined(USB_SERIES_2_AVR) #define Endpoint_BytesInEndpoint() UEBCLX #endif @@ -353,7 +355,7 @@ #if !defined(CONTROL_ONLY_DEVICE) #define Endpoint_SelectEndpoint(epnum) MACROS{ UENUM = (epnum); }MACROE #else - #define Endpoint_SelectEndpoint(epnum) (void)epnum + #define Endpoint_SelectEndpoint(epnum) (void)(epnum) #endif #define Endpoint_ResetFIFO(epnum) MACROS{ UERST = (1 << (epnum)); UERST = 0; }MACROE @@ -735,7 +737,7 @@ bool Endpoint_ConfigureEndpoint(const uint8_t Number, const uint8_t Type, const uint8_t Direction, const uint16_t Size, const uint8_t Banks); - /** Spinloops until the currently selected non-control endpoint is ready for the next packet of data + /** Spin-loops until the currently selected non-control endpoint is ready for the next packet of data * to be read or written to it. * * \note This routine should not be called on CONTROL type endpoints. @@ -1205,7 +1207,7 @@ } return (MaskVal << EPSIZE0); - }; + } #endif