Module Source Dependencies
The following files must be built with any user project that uses this module:
- LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c (Makefile source module name: LUFA_SRC_USBCLASS)
Module Description
Device Mode USB Class driver framework interface, for the RNDIS USB Class driver.
Configures the endpoints of a given RNDIS interface, ready for use. This should be linked to the library EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration containing the given RNDIS interface is selected.
- Parameters
-
[in,out] | RNDISInterfaceInfo | Pointer to a structure containing a RNDIS Class configuration and state. |
- Returns
- Boolean
true
if the endpoints were successfully configured, false
otherwise.
Determines if a packet is currently waiting for the device to read in and process.
- Precondition
- This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or the call will fail.
- Parameters
-
[in,out] | RNDISInterfaceInfo | Pointer to a structure containing an RNDIS Class configuration and state. |
- Returns
- Boolean
true
if a packet is waiting to be read in by the host, false
otherwise.
Processes incoming control requests from the host, that are directed to the given RNDIS class interface. This should be linked to the library EVENT_USB_Device_ControlRequest() event.
- Parameters
-
[in,out] | RNDISInterfaceInfo | Pointer to a structure containing a RNDIS Class configuration and state. |
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 device in the nominated buffer.
- Precondition
- This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or the call will fail.
- Parameters
-
[in,out] | RNDISInterfaceInfo | Pointer to a structure containing an RNDIS Class configuration and state. |
[out] | Buffer | Pointer to a buffer where the packer data is to be written to. |
[out] | PacketLength | Pointer to where the length in bytes of the read packet is to be stored. |
- Returns
- A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.
- Precondition
- This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or the call will fail.
- Parameters
-
[in,out] | RNDISInterfaceInfo | Pointer to a structure containing an RNDIS Class configuration and state. |
[in] | Buffer | Pointer to a buffer where the packer data is to be read from. |
[in] | PacketLength | Length in bytes of the packet to send. |
- Returns
- A value from the Endpoint_Stream_RW_ErrorCodes_t enum.
General management task for a given RNDIS 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 USB_USBTask().
- Parameters
-
[in,out] | RNDISInterfaceInfo | Pointer to a structure containing a RNDIS Class configuration and state. |