/*\r
LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
+ Copyright (C) Dean Camera, 2010.\r
\r
dean [at] fourwalledcubicle [dot] com\r
www.fourwalledcubicle.com\r
*/\r
\r
/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+ Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
\r
Permission to use, copy, modify, distribute, and sell this \r
software and its documentation for any purpose is hereby granted\r
#define RNDIS_COMMAND_FAILED 0xC0 \r
\r
/* Function Prototypes: */\r
- /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should\r
- * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().\r
- *\r
- * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state\r
- */\r
- void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
- \r
/** Host interface configuration routine, to configure a given RNDIS host interface instance using the Configuration\r
* Descriptor read from an attached USB device. This function automatically updates the given RNDIS Host instance's\r
* state values and configures the pipes required to communicate with the interface if it is found within the device.\r
\r
/** Determines if a packet is currently waiting for the host to read in and process.\r
*\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state\r
*\r
* \return Boolean true if a packet is waiting to be read in by the host, false otherwise\r
/** Retrieves the next pending packet from the device, discarding the remainder of the RNDIS packet header to leave\r
* only the packet contents for processing by the host in the nominated buffer.\r
*\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state\r
* \param[out] Buffer Pointer to a buffer where the packer data is to be written to\r
* \param[out] PacketLength Pointer to where the length in bytes of the read packet is to be stored\r
\r
/** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.\r
*\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state\r
* \param[in] Buffer Pointer to a buffer where the packer data is to be read from\r
* \param[in] PacketLength Length in bytes of the packet to send\r
uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t PacketLength)\r
ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);\r
\r
+ /* Inline Functions: */\r
+ /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should\r
+ * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().\r
+ *\r
+ * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state\r
+ */\r
+ static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo);\r
+ static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)\r
+ {\r
+ (void)RNDISInterfaceInfo;\r
+ }\r
+\r
/* Private Interface - For use in library only: */\r
#if !defined(__DOXYGEN__)\r
/* Macros: */\r