From 6b5e684c77e5fa855b609d01e9a07fec296e9257 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 19 Jul 2010 14:00:44 +0000 Subject: 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. --- Projects/TempDataLogger/Lib/SCSI.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'Projects/TempDataLogger/Lib/SCSI.c') diff --git a/Projects/TempDataLogger/Lib/SCSI.c b/Projects/TempDataLogger/Lib/SCSI.c index 7bb66d3b6..fb841e34b 100644 --- a/Projects/TempDataLogger/Lib/SCSI.c +++ b/Projects/TempDataLogger/Lib/SCSI.c @@ -249,15 +249,9 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte */ static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const 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 >= VIRTUAL_MEMORY_BLOCKS) { -- cgit v1.2.3