aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/Incomplete/MassStorage/Lib/SCSI.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-03-09 08:00:22 +0000
committerDean Camera <dean@fourwalledcubicle.com>2013-03-09 08:00:22 +0000
commit7f5dab4f261e08972d3f31512c970c29e54707d1 (patch)
tree4516c9e866ddb64a080d79394d65e1052a45495a /Bootloaders/Incomplete/MassStorage/Lib/SCSI.c
parentf0c7a11670b2e31ab35c22a41c705841bcd64637 (diff)
downloadlufa-7f5dab4f261e08972d3f31512c970c29e54707d1.tar.gz
lufa-7f5dab4f261e08972d3f31512c970c29e54707d1.tar.bz2
lufa-7f5dab4f261e08972d3f31512c970c29e54707d1.zip
Refactor macros in the VirtualFAT implementation of the incomplete Mass Storage bootloader.
Diffstat (limited to 'Bootloaders/Incomplete/MassStorage/Lib/SCSI.c')
-rw-r--r--Bootloaders/Incomplete/MassStorage/Lib/SCSI.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bootloaders/Incomplete/MassStorage/Lib/SCSI.c b/Bootloaders/Incomplete/MassStorage/Lib/SCSI.c
index c6596d41a..7ab149ccd 100644
--- a/Bootloaders/Incomplete/MassStorage/Lib/SCSI.c
+++ b/Bootloaders/Incomplete/MassStorage/Lib/SCSI.c
@@ -214,7 +214,7 @@ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterf
static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{
uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
- uint32_t MediaBlockSize = VIRTUAL_MEMORY_BLOCK_SIZE;
+ uint32_t MediaBlockSize = SECTOR_SIZE_BYTES;
Endpoint_Write_Stream_BE(&LastBlockAddressInLUN, sizeof(LastBlockAddressInLUN), NULL);
Endpoint_Write_Stream_BE(&MediaBlockSize, sizeof(MediaBlockSize), NULL);
@@ -292,7 +292,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
VirtualFAT_WriteBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
/* Update the bytes transferred counter and succeed the command */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength -= ((uint32_t)TotalBlocks * VIRTUAL_MEMORY_BLOCK_SIZE);
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= ((uint32_t)TotalBlocks * SECTOR_SIZE_BYTES);
return true;
}