usbd_rndis.h File Reference

USB RNDIS class. More...

#include "usbd_ioreq.h"

Go to the source code of this file.

Macros

#define RNDIS_NOTIFICATION_EP   0x81
 
#define RNDIS_DATA_IN_EP   0x82
 
#define RNDIS_DATA_OUT_EP   0x03
 
#define RNDIS_NOTIFICATION_EP_MPS   64
 
#define RNDIS_DATA_IN_EP_MPS_FS   64
 
#define RNDIS_DATA_OUT_EP_MPS_FS   64
 
#define RNDIS_DATA_IN_EP_MPS_HS   512
 
#define RNDIS_DATA_OUT_EP_MPS_HS   512
 
#define RNDIS_SEND_ENCAPSULATED_COMMAND   0x00
 
#define RNDIS_GET_ENCAPSULATED_RESPONSE   0x01
 
#define USBD_RNDIS_CLASS   &usbdRndisClass
 

Functions

uint8_t usbdRndisInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
 RNDIS class initialization. More...
 
uint8_t usbdRndisDeInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
 RNDIS class de-initialization. More...
 
uint8_t usbdRndisSetup (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
 Process incoming setup request. More...
 
uint8_t usbdRndisEp0RxReady (USBD_HandleTypeDef *pdev)
 Handle data stage (control endpoint) More...
 
uint8_t usbdRndisDataIn (USBD_HandleTypeDef *pdev, uint8_t epnum)
 DATA IN callback. More...
 
uint8_t usbdRndisDataOut (USBD_HandleTypeDef *pdev, uint8_t epnum)
 DATA OUT callback. More...
 
uint8_t * usbdRndisGetHighSpeedConfigDesc (uint16_t *length)
 Retrieve configuration descriptor (high speed) More...
 
uint8_t * usbdRndisGetFullSpeedConfigDesc (uint16_t *length)
 Retrieve configuration descriptor (full speed) More...
 
uint8_t * usbdRndisGetOtherSpeedConfigDesc (uint16_t *length)
 Retrieve configuration descriptor (other speed) More...
 
uint8_t * usbdRndisGetDeviceQualifierDesc (uint16_t *length)
 Retrieve device qualifier descriptor. More...
 

Variables

USBD_HandleTypeDef USBD_Device
 
USBD_ClassTypeDef usbdRndisClass
 RNDIS class callbacks. More...
 

Detailed Description

USB RNDIS class.

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Pro.

This software is provided under a commercial license. You may use this software under the conditions stated in the license terms. This source code cannot be redistributed.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file usbd_rndis.h.

Macro Definition Documentation

◆ RNDIS_DATA_IN_EP

#define RNDIS_DATA_IN_EP   0x82

Definition at line 27 of file usbd_rndis.h.

◆ RNDIS_DATA_IN_EP_MPS_FS

#define RNDIS_DATA_IN_EP_MPS_FS   64

Definition at line 32 of file usbd_rndis.h.

◆ RNDIS_DATA_IN_EP_MPS_HS

#define RNDIS_DATA_IN_EP_MPS_HS   512

Definition at line 34 of file usbd_rndis.h.

◆ RNDIS_DATA_OUT_EP

#define RNDIS_DATA_OUT_EP   0x03

Definition at line 28 of file usbd_rndis.h.

◆ RNDIS_DATA_OUT_EP_MPS_FS

#define RNDIS_DATA_OUT_EP_MPS_FS   64

Definition at line 33 of file usbd_rndis.h.

◆ RNDIS_DATA_OUT_EP_MPS_HS

#define RNDIS_DATA_OUT_EP_MPS_HS   512

Definition at line 35 of file usbd_rndis.h.

◆ RNDIS_GET_ENCAPSULATED_RESPONSE

#define RNDIS_GET_ENCAPSULATED_RESPONSE   0x01

Definition at line 39 of file usbd_rndis.h.

◆ RNDIS_NOTIFICATION_EP

#define RNDIS_NOTIFICATION_EP   0x81

Definition at line 26 of file usbd_rndis.h.

◆ RNDIS_NOTIFICATION_EP_MPS

#define RNDIS_NOTIFICATION_EP_MPS   64

Definition at line 31 of file usbd_rndis.h.

◆ RNDIS_SEND_ENCAPSULATED_COMMAND

#define RNDIS_SEND_ENCAPSULATED_COMMAND   0x00

Definition at line 38 of file usbd_rndis.h.

◆ USBD_RNDIS_CLASS

#define USBD_RNDIS_CLASS   &usbdRndisClass

Definition at line 44 of file usbd_rndis.h.

Function Documentation

◆ usbdRndisDataIn()

uint8_t usbdRndisDataIn ( USBD_HandleTypeDef *  pdev,
uint8_t  epnum 
)

DATA IN callback.

Parameters
[in]pdevPointer to a USBD_HandleTypeDef structure
[in]epnumEndpoint number
Returns
Status code

Definition at line 280 of file usbd_rndis.c.

◆ usbdRndisDataOut()

uint8_t usbdRndisDataOut ( USBD_HandleTypeDef *  pdev,
uint8_t  epnum 
)

DATA OUT callback.

Parameters
[in]pdevPointer to a USBD_HandleTypeDef structure
[in]epnumEndpoint number
Returns
Status code

Definition at line 325 of file usbd_rndis.c.

◆ usbdRndisDeInit()

uint8_t usbdRndisDeInit ( USBD_HandleTypeDef *  pdev,
uint8_t  cfgidx 
)

RNDIS class de-initialization.

Parameters
[in]pdevPointer to a USBD_HandleTypeDef structure
[in]cfgidxConfiguration index
Returns
Status code

Definition at line 130 of file usbd_rndis.c.

◆ usbdRndisEp0RxReady()

uint8_t usbdRndisEp0RxReady ( USBD_HandleTypeDef *  pdev)

Handle data stage (control endpoint)

Parameters
[in]pdevPointer to a USBD_HandleTypeDef structure
Returns
Status code

Definition at line 254 of file usbd_rndis.c.

◆ usbdRndisGetDeviceQualifierDesc()

uint8_t* usbdRndisGetDeviceQualifierDesc ( uint16_t *  length)

Retrieve device qualifier descriptor.

Parameters
[out]lengthLength of the descriptor, in bytes
Returns
Pointer to the descriptor

Definition at line 458 of file usbd_rndis.c.

◆ usbdRndisGetFullSpeedConfigDesc()

uint8_t* usbdRndisGetFullSpeedConfigDesc ( uint16_t *  length)

Retrieve configuration descriptor (full speed)

Parameters
[out]lengthLength of the descriptor, in bytes
Returns
Pointer to the descriptor

Definition at line 430 of file usbd_rndis.c.

◆ usbdRndisGetHighSpeedConfigDesc()

uint8_t* usbdRndisGetHighSpeedConfigDesc ( uint16_t *  length)

Retrieve configuration descriptor (high speed)

Parameters
[out]lengthLength of the descriptor, in bytes
Returns
Pointer to the descriptor

Definition at line 416 of file usbd_rndis.c.

◆ usbdRndisGetOtherSpeedConfigDesc()

uint8_t* usbdRndisGetOtherSpeedConfigDesc ( uint16_t *  length)

Retrieve configuration descriptor (other speed)

Parameters
[out]lengthLength of the descriptor, in bytes
Returns
Pointer to the descriptor

Definition at line 444 of file usbd_rndis.c.

◆ usbdRndisInit()

uint8_t usbdRndisInit ( USBD_HandleTypeDef *  pdev,
uint8_t  cfgidx 
)

RNDIS class initialization.

Parameters
[in]pdevPointer to a USBD_HandleTypeDef structure
[in]cfgidxConfiguration index
Returns
Status code

Definition at line 71 of file usbd_rndis.c.

◆ usbdRndisSetup()

uint8_t usbdRndisSetup ( USBD_HandleTypeDef *  pdev,
USBD_SetupReqTypedef *  req 
)

Process incoming setup request.

Parameters
[in]pdevPointer to a USBD_HandleTypeDef structure
[in]reqPointer to the setup request
Returns
Status code

Definition at line 157 of file usbd_rndis.c.

Variable Documentation

◆ USBD_Device

USBD_HandleTypeDef USBD_Device

◆ usbdRndisClass

USBD_ClassTypeDef usbdRndisClass

RNDIS class callbacks.

Definition at line 45 of file usbd_rndis.c.