X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f29fc1abc40dd862689ca8765e244c1212742744..24f730fce3f2022762011d795c3feada5ef874b3:/LUFA/Drivers/USB/LowLevel/Endpoint.h?ds=sidebyside diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index 5bbbb87b5..ef23253a5 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -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