X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6122ba93cf957bd495fdd1838bac16fb24896a17..8154331da60ac08b0e2b09ca67008ec4a8c7698b:/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 7c304097b..502e9021d 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -53,6 +53,11 @@ 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 */ @@ -113,14 +118,6 @@ }; /* Function Prototypes: */ - /** General management task for a given Mass Storage host class interface, required for the correct operation of - * the interface. This should be called frequently in the main program loop, before the master USB management task - * \ref USB_USBTask(). - * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state - */ - void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); - /** Host interface configuration routine, to configure a given Mass Storage host interface instance using the * Configuration Descriptor read from an attached USB device. This function automatically updates the given Mass * Storage Host instance's state values and configures the pipes required to communicate with the interface if it @@ -269,6 +266,19 @@ 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); + /* Inline Functions: */ + /** General management task for a given Mass Storage host class interface, required for the correct operation of + * the interface. This should be called frequently in the main program loop, before the master USB management task + * \ref USB_USBTask(). + * + * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state + */ + static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo); + static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) + { + (void)MSInterfaceInfo; + } + /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) /* Macros: */ @@ -291,7 +301,7 @@ #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);