projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing const qualifier to the parameters of the USB_GetNextDescriptorComp()...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
MassStorageKeyboard
/
Lib
/
SCSI.c
diff --git
a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
index
e4bf4d6
..
35a0ea7
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
+++ b/
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
@@
-148,8
+148,7
@@
bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
*/
static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
{
*/
static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
{
- uint16_t AllocationLength = (((uint16_t)MSInterfaceInfo->State.CommandBlock.SCSICommandData[3] << 8) |
- MSInterfaceInfo->State.CommandBlock.SCSICommandData[4]);
+ uint16_t AllocationLength = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
uint16_t BytesTransferred = (AllocationLength < sizeof(InquiryData))? AllocationLength :
sizeof(InquiryData);
uint16_t BytesTransferred = (AllocationLength < sizeof(InquiryData))? AllocationLength :
sizeof(InquiryData);