X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..03ee87b35abdb8b92e8b55ec040fa943f9a6786c:/LUFA/Drivers/USB/Class/Host/RNDIS.h diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.h b/LUFA/Drivers/USB/Class/Host/RNDIS.h index 827cd65a0..fc9b4b325 100644 --- a/LUFA/Drivers/USB/Class/Host/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Host/RNDIS.h @@ -120,13 +120,6 @@ #define RNDIS_COMMAND_FAILED 0xC0 /* Function Prototypes: */ - /** General management task for a given RNDIS 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] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state - */ - void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); - /** Host interface configuration routine, to configure a given RNDIS host interface instance using the Configuration * Descriptor read from an attached USB device. This function automatically updates the given RNDIS Host instance's * state values and configures the pipes required to communicate with the interface if it is found within the device. @@ -190,6 +183,9 @@ /** Determines if a packet is currently waiting for the host to read in and process. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state * * \return Boolean true if a packet is waiting to be read in by the host, false otherwise @@ -200,6 +196,9 @@ /** Retrieves the next pending packet from the device, discarding the remainder of the RNDIS packet header to leave * only the packet contents for processing by the host in the nominated buffer. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state * \param[out] Buffer Pointer to a buffer where the packer data is to be written to * \param[out] PacketLength Pointer to where the length in bytes of the read packet is to be stored @@ -211,6 +210,9 @@ /** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state * \param[in] Buffer Pointer to a buffer where the packer data is to be read from * \param[in] PacketLength Length in bytes of the packet to send @@ -220,6 +222,18 @@ uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t PacketLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + /* Inline Functions: */ + /** General management task for a given RNDIS 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] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state + */ + static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo); + static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) + { + (void)RNDISInterfaceInfo; + } + /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) /* Macros: */