Macros | Functions | Variables
usbd_cdc_core.c File Reference

This file provides the high layer firmware functions to manage the following functionalities of the USB CDC Class: More...

#include "usbd_cdc_core.h"
#include "usbd_desc.h"
#include "usbd_req.h"
Include dependency graph for usbd_cdc_core.c:

Go to the source code of this file.

Macros

#define USB_CDC_BUSY   1
 
#define USB_CDC_IDLE   0
 
#define USB_CDC_ZLP   2
 

Functions

static void Handle_USBAsynchXfer (void *pdev)
 Handle_USBAsynchXfer Send data to USB. More...
 
uint8_t usbd_cdc_DataIn (void *pdev, uint8_t epnum)
 usbd_audio_DataIn Data sent on non-control IN endpoint More...
 
uint8_t usbd_cdc_DataOut (void *pdev, uint8_t epnum)
 usbd_cdc_DataOut Data received on non-control Out endpoint More...
 
uint8_t usbd_cdc_DeInit (void *pdev, uint8_t cfgidx)
 usbd_cdc_Init DeInitialize the CDC layer More...
 
uint8_t usbd_cdc_EP0_RxReady (void *pdev)
 usbd_cdc_EP0_RxReady Data received on control endpoint More...
 
static uint8_t * USBD_cdc_GetCfgDesc (uint8_t speed, uint16_t *length)
 USBD_cdc_GetCfgDesc Return configuration descriptor. More...
 
uint8_t usbd_cdc_Init (void *pdev, uint8_t cfgidx)
 usbd_cdc_Init Initialize the CDC interface More...
 
uint8_t usbd_cdc_Setup (void *pdev, USB_SETUP_REQ *req)
 usbd_cdc_Setup Handle the CDC specific requests More...
 
uint8_t usbd_cdc_SOF (void *pdev)
 usbd_audio_SOF Start Of Frame event management More...
 

Variables

__ALIGN_BEGIN uint8_t usbd_cdc_CfgDesc[USB_CDC_CONFIG_DESC_SIZ__ALIGN_END = 0
 
CDC_IF_Prop_TypeDef APP_FOPS
 
uint32_t APP_Rx_length = 0
 
uint32_t APP_Rx_ptr_in = 0
 
uint32_t APP_Rx_ptr_out = 0
 
static uint32_t cdcCmd = 0xFF
 
static uint32_t cdcLen = 0
 
uint8_t USB_Tx_State = USB_CDC_IDLE
 
USBD_Class_cb_TypeDef USBD_CDC_cb
 
uint8_t USBD_DeviceDesc [USB_SIZ_DEVICE_DESC]
 

Detailed Description

This file provides the high layer firmware functions to manage the following functionalities of the USB CDC Class:

Author
MCD Application Team
Version
V1.2.0
Date
09-November-2015
  • Initialization and Configuration of high and low layer
  • Enumeration as CDC Device (and enumeration for each implemented memory interface)
  • OUT/IN data transfer
  • Command IN transfer (class requests management)
  • Error management
*      
*          ===================================================================      
*                                CDC Class Driver Description
*          =================================================================== 
*           This driver manages the "Universal Serial Bus Class Definitions for Communications Devices
*           Revision 1.2 November 16, 2007" and the sub-protocol specification of "Universal Serial Bus 
*           Communications Class Subclass Specification for PSTN Devices Revision 1.2 February 9, 2007"
*           This driver implements the following aspects of the specification:
*             - Device descriptor management
*             - Configuration descriptor management
*             - Enumeration as CDC device with 2 data endpoints (IN and OUT) and 1 command endpoint (IN)
*             - Requests management (as described in section 6.2 in specification)
*             - Abstract Control Model compliant
*             - Union Functional collection (using 1 IN endpoint for control)
*             - Data interface class

*           @note
*             For the Abstract Control Model, this core allows only transmitting the requests to
*             lower layer dispatcher (ie. usbd_cdc_vcp.c/.h) which should manage each request and
*             perform relative actions.
* 
*           These aspects may be enriched or modified for a specific user application.
*          
*            This driver doesn't implement the following aspects of the specification 
*            (but it is possible to manage these features with some modifications on this driver):
*             - Any class-specific aspect relative to communication classes should be managed by user application.
*             - All communication classes other than PSTN are not managed
*      
*  
Attention

© COPYRIGHT 2015 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_core.c.



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