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

SPDX-License-Identifier: GPL-2.0-or-later

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

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

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

Definition in file usbd_rndis.h.

Macro Definition Documentation

◆ RNDIS_DATA_IN_EP

#define RNDIS_DATA_IN_EP   0x82

Definition at line 39 of file usbd_rndis.h.

◆ RNDIS_DATA_IN_EP_MPS_FS

#define RNDIS_DATA_IN_EP_MPS_FS   64

Definition at line 44 of file usbd_rndis.h.

◆ RNDIS_DATA_IN_EP_MPS_HS

#define RNDIS_DATA_IN_EP_MPS_HS   512

Definition at line 46 of file usbd_rndis.h.

◆ RNDIS_DATA_OUT_EP

#define RNDIS_DATA_OUT_EP   0x03

Definition at line 40 of file usbd_rndis.h.

◆ RNDIS_DATA_OUT_EP_MPS_FS

#define RNDIS_DATA_OUT_EP_MPS_FS   64

Definition at line 45 of file usbd_rndis.h.

◆ RNDIS_DATA_OUT_EP_MPS_HS

#define RNDIS_DATA_OUT_EP_MPS_HS   512

Definition at line 47 of file usbd_rndis.h.

◆ RNDIS_GET_ENCAPSULATED_RESPONSE

#define RNDIS_GET_ENCAPSULATED_RESPONSE   0x01

Definition at line 51 of file usbd_rndis.h.

◆ RNDIS_NOTIFICATION_EP

#define RNDIS_NOTIFICATION_EP   0x81

Definition at line 38 of file usbd_rndis.h.

◆ RNDIS_NOTIFICATION_EP_MPS

#define RNDIS_NOTIFICATION_EP_MPS   64

Definition at line 43 of file usbd_rndis.h.

◆ RNDIS_SEND_ENCAPSULATED_COMMAND

#define RNDIS_SEND_ENCAPSULATED_COMMAND   0x00

Definition at line 50 of file usbd_rndis.h.

◆ USBD_RNDIS_CLASS

#define USBD_RNDIS_CLASS   &usbdRndisClass

Definition at line 56 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 292 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 337 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 142 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 266 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 470 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 442 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 428 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 456 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 83 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 169 of file usbd_rndis.c.

Variable Documentation

◆ USBD_Device

USBD_HandleTypeDef USBD_Device
extern

◆ usbdRndisClass

USBD_ClassTypeDef usbdRndisClass
extern

RNDIS class callbacks.

Definition at line 57 of file usbd_rndis.c.