X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/0e6d5cf5b4fea133cbd3c16b958617deb42332cf..72527867f6bd2d800bd0a71a90fe7079fbe1ab47:/LUFA/Drivers/USB/LowLevel/Endpoint.h diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index cf6fbc632..ae4086779 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -66,17 +66,11 @@ #define __ENDPOINT_H__ /* Includes: */ - #if defined(__AVR32__) - #include - #include - #include - #elif defined(__AVR__) - #include - #include - #include - #include - #endif - + #include + #include + #include + #include + #include "../../../Common/Common.h" #include "../HighLevel/USBTask.h" @@ -91,7 +85,7 @@ /* Preprocessor Checks: */ #if !defined(__INCLUDE_FROM_USB_DRIVER) - #error Do not include this file directly. Include LUFA/Drivers/USB.h instead. + #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead. #endif /* Public Interface - May be used in end-application: */ @@ -492,11 +486,7 @@ static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_Read_Byte(void) { - #if defined(__AVR32__) - return 0; // TODO - #elif defined(__AVR__) return UEDATX; - #endif } /** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints. @@ -508,11 +498,7 @@ static inline void Endpoint_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_Byte(const uint8_t Byte) { - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) UEDATX = Byte; - #endif } /** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints. @@ -524,11 +510,7 @@ { uint8_t Dummy; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Dummy = UEDATX; - #endif } /** Reads two bytes from the currently selected endpoint's bank in little endian format, for OUT @@ -547,12 +529,8 @@ uint8_t Bytes[2]; } Data; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Data.Bytes[0] = UEDATX; Data.Bytes[1] = UEDATX; - #endif return Data.Word; } @@ -573,12 +551,8 @@ uint8_t Bytes[2]; } Data; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Data.Bytes[1] = UEDATX; Data.Bytes[0] = UEDATX; - #endif return Data.Word; } @@ -593,12 +567,8 @@ static inline void Endpoint_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_Word_LE(const uint16_t Word) { - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) UEDATX = (Word & 0xFF); UEDATX = (Word >> 8); - #endif } /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN @@ -611,12 +581,8 @@ static inline void Endpoint_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_Word_BE(const uint16_t Word) { - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) UEDATX = (Word >> 8); UEDATX = (Word & 0xFF); - #endif } /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints. @@ -628,12 +594,8 @@ { uint8_t Dummy; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Dummy = UEDATX; Dummy = UEDATX; - #endif } /** Reads four bytes from the currently selected endpoint's bank in little endian format, for OUT @@ -652,14 +614,10 @@ uint8_t Bytes[4]; } Data; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Data.Bytes[0] = UEDATX; Data.Bytes[1] = UEDATX; Data.Bytes[2] = UEDATX; Data.Bytes[3] = UEDATX; - #endif return Data.DWord; } @@ -680,14 +638,10 @@ uint8_t Bytes[4]; } Data; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Data.Bytes[3] = UEDATX; Data.Bytes[2] = UEDATX; Data.Bytes[1] = UEDATX; Data.Bytes[0] = UEDATX; - #endif return Data.DWord; } @@ -702,14 +656,10 @@ static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) { - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) UEDATX = (DWord & 0xFF); UEDATX = (DWord >> 8); UEDATX = (DWord >> 16); UEDATX = (DWord >> 24); - #endif } /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN @@ -722,14 +672,10 @@ static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) { - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) UEDATX = (DWord >> 24); UEDATX = (DWord >> 16); UEDATX = (DWord >> 8); UEDATX = (DWord & 0xFF); - #endif } /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints. @@ -741,14 +687,10 @@ { uint8_t Dummy; - #if defined(__AVR32__) - // TODO - #elif defined(__AVR__) Dummy = UEDATX; Dummy = UEDATX; Dummy = UEDATX; Dummy = UEDATX; - #endif } /* External Variables: */