diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-26 16:02:20 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-26 16:02:20 +0000 |
commit | 35564bb1a742be5556812fb763e6d0ceb45fefce (patch) | |
tree | b17d8bff005b2fdeaec53fa9253577dc9154ef2e /LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h | |
parent | f235021abe547f3366459480ba17f548f3119ee2 (diff) | |
download | lufa-35564bb1a742be5556812fb763e6d0ceb45fefce.tar.gz lufa-35564bb1a742be5556812fb763e6d0ceb45fefce.tar.bz2 lufa-35564bb1a742be5556812fb763e6d0ceb45fefce.zip |
Fixed swapped Little Endian/Big Endian endpoint and pipe write code for the UC3 devices (thanks to Andrew Chu).
Diffstat (limited to 'LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h')
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h index 84801a13f..a1b2a16f2 100644 --- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h +++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h @@ -605,8 +605,8 @@ static inline void Endpoint_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_16_LE(const uint16_t Data) { - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data & 0xFF); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); } /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN @@ -619,8 +619,8 @@ static inline void Endpoint_Write_16_BE(const uint16_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_16_BE(const uint16_t Data) { - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data & 0xFF); *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data & 0xFF); } /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints. @@ -684,10 +684,10 @@ static inline void Endpoint_Write_32_LE(const uint32_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_32_LE(const uint32_t Data) { - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 24); - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 16); - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data & 0xFF); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 16); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 24); } /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN @@ -700,10 +700,10 @@ static inline void Endpoint_Write_32_BE(const uint32_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_32_BE(const uint32_t Data) { - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data & 0xFF); - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); - *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 16); *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 24); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 16); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data >> 8); + *(USB_Endpoint_FIFOPos[USB_Endpoint_SelectedEndpoint]++) = (Data & 0xFF); } /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints. |