X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/60e96412220b62a614348c287354c56f282fcc70..d03d6513d0d24cf63225c8d3dfa07675d9107f40:/LUFA/Drivers/USB/Class/Host/MassStorage.h diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h index 6dda5c0a9..d2ab97009 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -28,6 +28,15 @@ this software. */ +/** \file + * \brief Host mode driver for the library USB Mass Storage Class driver. + * + * Host mode driver for the library USB Mass Storage Class driver. + * + * \note This file should not be included directly. It is automatically included as needed by the class driver + * dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h. + */ + /** \ingroup Group_USBClassMS * @defgroup Group_USBClassMassStorageHost Mass Storage Class Host Mode Driver * @@ -53,13 +62,20 @@ extern "C" { #endif + /* Preprocessor Checks: */ + #if !defined(__INCLUDE_FROM_MS_DRIVER) + #error Do not include this file directly. Include LUFA/Drivers/Class/MassStorage.h instead. + #endif + /* Public Interface - May be used in end-application: */ /* Macros: */ /** Error code for some Mass Storage Host functions, indicating a logical (and not hardware) error */ #define MS_ERROR_LOGICAL_CMD_FAILED 0x80 /* Type Defines: */ - /** Class state structure. An instance of this structure should be made within the user application, + /** \brief Mass Storage Class Host Mode Configuration and State Structure. + * + * Class state structure. An instance of this structure should be made within the user application, * and passed to each of the Mass Storage class driver functions as the MSInterfaceInfo parameter. This * stores each Mass Storage interface's configuration and state information. */ @@ -93,7 +109,9 @@ */ } USB_ClassInfo_MS_Host_t; - /** SCSI capacity structure, to hold the total capacity of the device in both the number + /** \brief SCSI Device LUN Capacity Structure. + * + * SCSI capacity structure, to hold the total capacity of the device in both the number * of blocks in the current LUN, and the size of each block. This structure is filled by * the device when the MassStore_ReadCapacity() function is called. */ @@ -259,7 +277,7 @@ */ 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) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6); + const void* BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6); /* Inline Functions: */ /** General management task for a given Mass Storage host class interface, required for the correct operation of @@ -296,13 +314,13 @@ #define MS_FOUND_DATAPIPE_OUT (1 << 1) /* Function Prototypes: */ - #if defined(INCLUDE_FROM_MS_CLASS_HOST_C) + #if defined(__INCLUDE_FROM_MS_CLASS_HOST_C) static uint8_t DComp_NextMSInterface(void* const CurrentDescriptor); 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); static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo); static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock, void* BufferPtr);