Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
ba711d67
Commit
ba711d67
authored
Jul 09, 2010
by
Dean Camera
Browse files
Oops - fix errors in the MassStorageKeyboard SCSI driver file due to incorrect copy/paste.
parent
c326fe96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
View file @
ba711d67
...
@@ -307,10 +307,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo
...
@@ -307,10 +307,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo
uint16_t
TotalBlocks
;
uint16_t
TotalBlocks
;
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
BlockAddress
=
SwapEndian_32
(
*
(
uint32_t
*
)
&
CommandBlock
.
SCSICommandData
[
2
]);
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) */
/* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */
TotalBlocks
=
SwapEndian_16
(
*
(
uint16_t
*
)
&
CommandBlock
.
SCSICommandData
[
7
]);
TotalBlocks
=
SwapEndian_16
(
*
(
uint16_t
*
)
&
MSInterfaceInfo
->
State
.
CommandBlock
.
SCSICommandData
[
7
]);
/* Check if the block address is outside the maximum allowable value for the LUN */
/* Check if the block address is outside the maximum allowable value for the LUN */
if
(
BlockAddress
>=
LUN_MEDIA_BLOCKS
)
if
(
BlockAddress
>=
LUN_MEDIA_BLOCKS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment