aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-10-25 04:28:22 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-10-25 04:28:22 +0000
commitbc14c1a7f61713128819f12fcdcc9ec10ff404ab (patch)
tree5d80f0f738d0a8c352be91e019bbf933083365c9 /LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
parente9029d49d5455ec146d2e87436d43d747d6c657a (diff)
downloadlufa-bc14c1a7f61713128819f12fcdcc9ec10ff404ab.tar.gz
lufa-bc14c1a7f61713128819f12fcdcc9ec10ff404ab.tar.bz2
lufa-bc14c1a7f61713128819f12fcdcc9ec10ff404ab.zip
Update XMEGA platform clock management example code to suit the currently released silicon.
Cleanups to the UC3 endpoint/pipe multi byte read code.
Diffstat (limited to 'LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h')
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
index 25957f27a..26346e95a 100644
--- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
@@ -662,10 +662,10 @@
static inline uint16_t Pipe_Read_16_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t Pipe_Read_16_LE(void)
{
- uint16_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
uint16_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
+ uint16_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
- return ((Byte0 << 8) | Byte1);
+ return ((Byte1 << 8) | Byte0);
}
/** Reads two bytes from the currently selected pipe's bank in big endian format, for OUT
@@ -737,12 +737,12 @@
static inline uint32_t Pipe_Read_32_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint32_t Pipe_Read_32_LE(void)
{
- uint32_t Byte3 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
- uint32_t Byte2 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
- uint32_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
uint32_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
+ uint32_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
+ uint32_t Byte2 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
+ uint32_t Byte3 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);
- return ((Byte0 << 24) | (Byte1 << 16) | (Byte2 << 8) | Byte3);
+ return ((Byte3 << 24) | (Byte2 << 16) | (Byte1 << 8) | Byte0);
}
/** Reads four bytes from the currently selected pipe's bank in big endian format, for OUT