aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/MassStorage/Lib
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-07-19 14:00:44 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-07-19 14:00:44 +0000
commit6b5e684c77e5fa855b609d01e9a07fec296e9257 (patch)
tree9ad7cfb13b684d5cdd0ed90703159b015f119734 /Demos/Device/ClassDriver/MassStorage/Lib
parent42ac34b484b677ae1004c3d0215b27911a100a71 (diff)
downloadlufa-6b5e684c77e5fa855b609d01e9a07fec296e9257.tar.gz
lufa-6b5e684c77e5fa855b609d01e9a07fec296e9257.tar.bz2
lufa-6b5e684c77e5fa855b609d01e9a07fec296e9257.zip
Update makefiles to use the latest WinAVR/Atmel toolchain makefile template.
Add new module source variables to the library core makefile, so that module sources can be added to a project's makefile on a per-module rather than per-file basis.
Diffstat (limited to 'Demos/Device/ClassDriver/MassStorage/Lib')
-rw-r--r--Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
index f0796eaed..24d7859f0 100644
--- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
+++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
@@ -249,14 +249,8 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceI
*/
static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const bool IsDataRead)
{
- uint32_t BlockAddress;
- uint16_t TotalBlocks;
-
- /* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
- BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
-
- /* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */
- TotalBlocks = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
+ uint32_t BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
+ uint16_t TotalBlocks = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
/* Check if the block address is outside the maximum allowable value for the LUN */
if (BlockAddress >= LUN_MEDIA_BLOCKS)