STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
← STM32duino documentation
Loading...
Searching...
No Matches
usbd_cdc.h File Reference

header file for the usbd_cdc.c file. More...

#include "usbd_ioreq.h"
#include "usbd_ep_conf.h"

Classes

struct  USBD_CDC_LineCodingTypeDef
 
struct  _USBD_CDC_Itf
 Application callbacks of the CDC class. More...
 
struct  USBD_CDC_HandleTypeDef
 CDC class instance data. More...
 

Macros

#define CDC_HS_BINTERVAL   0x10U
 Polling interval of the CDC command endpoint at high speed.
 
#define CDC_FS_BINTERVAL   0x10U
 Polling interval of the CDC command endpoint at full speed.
 
#define USB_CDC_CONFIG_DESC_SIZ   67U
 Size, in bytes, of the CDC configuration descriptor.
 
#define CDC_DATA_HS_IN_PACKET_SIZE   CDC_DATA_HS_MAX_PACKET_SIZE
 
#define CDC_DATA_HS_OUT_PACKET_SIZE   CDC_DATA_HS_MAX_PACKET_SIZE
 
#define CDC_DATA_FS_IN_PACKET_SIZE   CDC_DATA_FS_MAX_PACKET_SIZE
 
#define CDC_DATA_FS_OUT_PACKET_SIZE   CDC_DATA_FS_MAX_PACKET_SIZE
 
#define CDC_REQ_MAX_DATA_SIZE   0x7U
 Maximum size, in bytes, of a CDC class request data stage.
 
#define CDC_SEND_ENCAPSULATED_COMMAND   0x00U
 
#define CDC_GET_ENCAPSULATED_RESPONSE   0x01U
 
#define CDC_SET_COMM_FEATURE   0x02U
 
#define CDC_GET_COMM_FEATURE   0x03U
 
#define CDC_CLEAR_COMM_FEATURE   0x04U
 
#define CDC_SET_LINE_CODING   0x20U
 
#define CDC_GET_LINE_CODING   0x21U
 
#define CDC_SET_CONTROL_LINE_STATE   0x22U
 
#define CDC_SEND_BREAK   0x23U
 
#define CLS_DTR   (1 << 0)
 DTR bit (Data Terminal Ready) in SET_CONTROL_LINE_STATE wValue.
 
#define CLS_RTS   (1 << 1)
 RTS bit (Request To Send) in SET_CONTROL_LINE_STATE wValue.
 
#define USBD_CDC_CLASS   &USBD_CDC
 Pointer to the CDC class driver, as expected by USBD_RegisterClass().
 

Typedefs

typedef struct _USBD_CDC_Itf USBD_CDC_ItfTypeDef
 Application callbacks of the CDC class.
 

Functions

uint8_t USBD_CDC_RegisterInterface (USBD_HandleTypeDef *pdev, USBD_CDC_ItfTypeDef *fops)
 Register the application callbacks for the CDC class.
 
uint8_t USBD_CDC_SetTxBuffer (USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint32_t length)
 Set the buffer and length of the next data to send on the CDC IN endpoint.
 
uint8_t USBD_CDC_SetRxBuffer (USBD_HandleTypeDef *pdev, uint8_t *pbuff)
 Set the Rx buffer used for the next packet received on the CDC OUT endpoint.
 
uint8_t USBD_CDC_TransmitPacket (USBD_HandleTypeDef *pdev)
 Transmit the buffer set by USBD_CDC_SetTxBuffer() on the CDC IN endpoint.
 
uint8_t USBD_CDC_ReceivePacket (USBD_HandleTypeDef *pdev)
 Prepare the CDC OUT endpoint to receive the next packet into the Rx buffer.
 

Variables

USBD_ClassTypeDef USBD_CDC
 CDC class driver.
 

Detailed Description

header file for the usbd_cdc.c file.

Author
MCD Application Team
Attention

© Copyright (c) 2015 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044