X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/c49bdcb7c930f2d0e0cf6887b3326f9e8f7f37b3..d03d6513d0d24cf63225c8d3dfa07675d9107f40:/LUFA/Drivers/USB/Class/Host/MassStorage.c diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c index ca071752d..4ec0b244f 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, provided that the above copyright notice appear in all - copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -28,10 +28,12 @@ this software. */ +#define __INCLUDE_FROM_USB_DRIVER #include "../../HighLevel/USBMode.h" #if defined(USB_CAN_BE_HOST) -#define INCLUDE_FROM_MS_CLASS_HOST_C +#define __INCLUDE_FROM_MS_CLASS_HOST_C +#define __INCLUDE_FROM_MS_DRIVER #include "MassStorage.h" uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize, @@ -127,13 +129,8 @@ static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor) return DESCRIPTOR_SEARCH_NotFound; } -void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) -{ - -} - static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock, - void* BufferPtr) + const void* const BufferPtr) { uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -155,7 +152,7 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf Pipe_Freeze(); if ((BufferPtr != NULL) && - ((ErrorCode = MS_Host_SendReceiveData(MSInterfaceInfo, SCSICommandBlock, BufferPtr)) != PIPE_RWSTREAM_NoError)) + ((ErrorCode = MS_Host_SendReceiveData(MSInterfaceInfo, SCSICommandBlock, (void*)BufferPtr)) != PIPE_RWSTREAM_NoError)) { Pipe_Freeze(); return ErrorCode; @@ -560,7 +557,7 @@ uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, } uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress, - const uint8_t Blocks, const uint16_t BlockSize, void* BlockBuffer) + const uint8_t Blocks, const uint16_t BlockSize, const void* BlockBuffer) { if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive)) return HOST_SENDCONTROL_DeviceDisconnected;