![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Data Structures | |
struct | USB_ClassInfo_RNDIS_Device_t |
RNDIS Class Device Mode Configuration and State Structure. More... | |
Functions | |
bool | RNDIS_Device_ConfigureEndpoints (USB_ClassInfo_RNDIS_Device_t *const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) |
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. | |
void | RNDIS_Device_ProcessControlRequest (USB_ClassInfo_RNDIS_Device_t *const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) |
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. | |
void | RNDIS_Device_USBTask (USB_ClassInfo_RNDIS_Device_t *const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) |
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(). | |
bool | RNDIS_Device_IsPacketReceived (USB_ClassInfo_RNDIS_Device_t *const RNDISInterfaceInfo) |
Determines if a packet is currently waiting for the device to read in and process. | |
uint8_t | RNDIS_Device_ReadPacket (USB_ClassInfo_RNDIS_Device_t *const RNDISInterfaceInfo, void *Buffer, uint16_t *const PacketLength) |
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. | |
uint8_t | RNDIS_Device_SendPacket (USB_ClassInfo_RNDIS_Device_t *const RNDISInterfaceInfo, void *Buffer, const uint16_t PacketLength) |
Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header. | |
The following files must be built with any user project that uses this module:
Device Mode USB Class driver framework interface, for the RNDIS USB Class driver.
bool RNDIS_Device_ConfigureEndpoints | ( | USB_ClassInfo_RNDIS_Device_t *const | RNDISInterfaceInfo | ) |
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.
RNDISInterfaceInfo | : Pointer to a structure containing a RNDIS Class configuration and state. |
true
if the endpoints were successfully configured, false
otherwise. Definition at line 116 of file RNDISClassDevice.c.
bool RNDIS_Device_IsPacketReceived | ( | USB_ClassInfo_RNDIS_Device_t *const | RNDISInterfaceInfo | ) |
Determines if a packet is currently waiting for the device to read in and process.
RNDISInterfaceInfo | : Pointer to a structure containing an RNDIS Class configuration and state. |
true
if a packet is waiting to be read in by the host, false
otherwise. Definition at line 463 of file RNDISClassDevice.c.
void RNDIS_Device_ProcessControlRequest | ( | USB_ClassInfo_RNDIS_Device_t *const | RNDISInterfaceInfo | ) |
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.
RNDISInterfaceInfo | : Pointer to a structure containing a RNDIS Class configuration and state. |
Definition at line 73 of file RNDISClassDevice.c.
uint8_t RNDIS_Device_ReadPacket | ( | USB_ClassInfo_RNDIS_Device_t *const | RNDISInterfaceInfo, |
void * | Buffer, | ||
uint16_t *const | PacketLength | ||
) |
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.
RNDISInterfaceInfo | : Pointer to a structure containing an RNDIS Class configuration and state. |
Buffer | : Pointer to a buffer where the packer data is to be written to. |
PacketLength | : Pointer to where the length in bytes of the read packet is to be stored. |
Definition at line 475 of file RNDISClassDevice.c.
uint8_t RNDIS_Device_SendPacket | ( | USB_ClassInfo_RNDIS_Device_t *const | RNDISInterfaceInfo, |
void * | Buffer, | ||
const uint16_t | PacketLength | ||
) |
Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.
RNDISInterfaceInfo | : Pointer to a structure containing an RNDIS Class configuration and state. |
Buffer | : Pointer to a buffer where the packer data is to be read from. |
PacketLength | : Length in bytes of the packet to send. |
Definition at line 510 of file RNDISClassDevice.c.
void RNDIS_Device_USBTask | ( | USB_ClassInfo_RNDIS_Device_t *const | RNDISInterfaceInfo | ) |
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().
RNDISInterfaceInfo | : Pointer to a structure containing a RNDIS Class configuration and state. |
Definition at line 163 of file RNDISClassDevice.c.