GD32F10x USB-Device: E:/USB Libraries/GD32_USB_Device_Library/Class/cdc/inc/usbd_cdc_core.h Source File

GD32F103 Firmware

usbd_cdc_core.h
Go to the documentation of this file.
1 
11 /* Define to prevent recursive inclusion -------------------------------------*/
12 #ifndef __GD32F10X_USBD_CDC_CORE_H
13 #define __GD32F10X_USBD_CDC_CORE_H
14 
15 /* Includes ------------------------------------------------------------------*/
16 #include "usbd_desc.h"
17 #include "usbd_cdc_vcp.h"
18 
38 #define USB_CDC_CONFIG_DESC_SIZE (67)
39 #define USB_CDC_DESC_SIZE (58)
40 
41 #define CDC_DESC_TYPE 0x21
42 
43 #define CDC_DATA_IN_PACKET_SIZE USB_CDC_DATA_PACKET_SIZE
44 #define CDC_DATA_OUT_PACKET_SIZE USB_CDC_DATA_PACKET_SIZE
45 
46 /* CDC Requests */
47 #define SEND_ENCAPSULATED_COMMAND 0x00
48 #define GET_ENCAPSULATED_RESPONSE 0x01
49 #define SET_COMM_FEATURE 0x02
50 #define GET_COMM_FEATURE 0x03
51 #define CLEAR_COMM_FEATURE 0x04
52 #define SET_LINE_CODING 0x20
53 #define GET_LINE_CODING 0x21
54 #define SET_CONTROL_LINE_STATE 0x22
55 #define SEND_BREAK 0x23
56 #define NO_CMD 0xFF
57 
65 typedef struct _CDC_IF_FOP
66 {
67  uint16_t (*pIf_Init) (uint8_t Config);
68  uint16_t (*pIf_DeInit) (void);
69  uint16_t (*pIf_Ctrl) (uint8_t Cmd, uint8_t* CmdBuf, uint16_t Len);
70  uint16_t (*pIf_DataTx) (COM_TypeDef Com, uint8_t* DataBuf, uint16_t Len);
71  uint16_t (*pIf_DataRx) (COM_TypeDef Com, uint8_t* DataBuf, uint16_t Len);
72 }
74 
82 extern USBD_Class_cb_TypeDef USBD_CDC_cb;
83 
88 #endif /* __GD32F10X_USBD_CDC_CORE_H */
89 
106 /************************ (C) COPYRIGHT 2014 GIGADEVICE *****END OF FILE****/
USB device class callback type define.
Definition: usb_core.h:148
USB descriptor defines and function prototype.
Generated on Fri Feb 6 2015 14:56:35 for GD32F10x USB-Device by   doxygen 1.8.8