Functions | Variables
usbd_cdc_if_template.c File Reference

Generic media access Layer. More...

#include "usbd_cdc_if_template.h"
Include dependency graph for usbd_cdc_if_template.c:

Go to the source code of this file.

Functions

static uint16_t TEMPLATE_Ctrl (uint32_t Cmd, uint8_t *Buf, uint32_t Len)
 TEMPLATE_Ctrl Manage the CDC class requests. More...
 
static uint16_t TEMPLATE_DataRx (uint8_t *Buf, uint32_t Len)
 TEMPLATE_DataRx Data received over USB OUT endpoint are sent over CDC interface through this function. More...
 
static uint16_t TEMPLATE_DataTx (uint8_t *Buf, uint32_t Len)
 TEMPLATE_DataTx CDC received data to be send over USB IN endpoint are managed in this function. More...
 
static uint16_t TEMPLATE_DeInit (void)
 TEMPLATE_DeInit DeInitializes the CDC media low layer. More...
 
static uint16_t TEMPLATE_Init (void)
 TEMPLATE_Init Initializes the CDC media low layer. More...
 

Variables

uint8_t APP_Rx_Buffer []
 
uint32_t APP_Rx_ptr_in
 
CDC_IF_Prop_TypeDef TEMPLATE_fops
 

Detailed Description

Generic media access Layer.

Author
MCD Application Team
Version
V1.1.0
Date
19-March-2012
Attention

© COPYRIGHT 2012 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file usbd_cdc_if_template.c.

Function Documentation

static uint16_t TEMPLATE_Ctrl ( uint32_t  Cmd,
uint8_t *  Buf,
uint32_t  Len 
)
static

TEMPLATE_Ctrl Manage the CDC class requests.

Parameters
CmdCommand code
BufBuffer containing command data (request parameters)
LenNumber of data to be sent (in bytes)
Return values
Resultof the opeartion: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 103 of file usbd_cdc_if_template.c.

static uint16_t TEMPLATE_DataRx ( uint8_t *  Buf,
uint32_t  Len 
)
static

TEMPLATE_DataRx Data received over USB OUT endpoint are sent over CDC interface through this function.

Note
This function will block any OUT packet reception on USB endpoint untill exiting this function. If you exit this function before transfer is complete on CDC interface (ie. using DMA controller) it will result in receiving more data while previous ones are still not sent.
Parameters
BufBuffer of data to be received
LenNumber of data received (in bytes)
Return values
Resultof the opeartion: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 194 of file usbd_cdc_if_template.c.

static uint16_t TEMPLATE_DataTx ( uint8_t *  Buf,
uint32_t  Len 
)
static

TEMPLATE_DataTx CDC received data to be send over USB IN endpoint are managed in this function.

Parameters
BufBuffer of data to be sent
LenNumber of data to be sent (in bytes)
Return values
Resultof the opeartion: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 158 of file usbd_cdc_if_template.c.

static uint16_t TEMPLATE_DeInit ( void  )
static

TEMPLATE_DeInit DeInitializes the CDC media low layer.

Parameters
None
Return values
Resultof the opeartion: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 86 of file usbd_cdc_if_template.c.

static uint16_t TEMPLATE_Init ( void  )
static

TEMPLATE_Init Initializes the CDC media low layer.

Parameters
None
Return values
Resultof the opeartion: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 72 of file usbd_cdc_if_template.c.

Variable Documentation

CDC_IF_Prop_TypeDef TEMPLATE_fops
Initial value:
=
{
}
static uint16_t TEMPLATE_Ctrl(uint32_t Cmd, uint8_t *Buf, uint32_t Len)
TEMPLATE_Ctrl Manage the CDC class requests.
static uint16_t TEMPLATE_DataTx(uint8_t *Buf, uint32_t Len)
TEMPLATE_DataTx CDC received data to be send over USB IN endpoint are managed in this function...
static uint16_t TEMPLATE_Init(void)
TEMPLATE_Init Initializes the CDC media low layer.
static uint16_t TEMPLATE_DataRx(uint8_t *Buf, uint32_t Len)
TEMPLATE_DataRx Data received over USB OUT endpoint are sent over CDC interface through this function...
static uint16_t TEMPLATE_DeInit(void)
TEMPLATE_DeInit DeInitializes the CDC media low layer.

Definition at line 55 of file usbd_cdc_if_template.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:28