X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/60e96412220b62a614348c287354c56f282fcc70..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 7a302632b..4ec0b244f 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c @@ -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, @@ -128,7 +130,7 @@ static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor) } 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; @@ -150,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; @@ -555,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;