12 #ifndef __GD32F1X0_USBD_CDC_CORE_H
13 #define __GD32F1X0_USBD_CDC_CORE_H
17 #include "usbd_cdc_vcp.h"
38 #define USB_CDC_CONFIG_DESC_SIZE (67)
39 #define USB_CDC_DESC_SIZE (58)
41 #define CDC_DESC_TYPE 0x21
43 #define CDC_DATA_IN_PACKET_SIZE USB_CDC_DATA_PACKET_SIZE
44 #define CDC_DATA_OUT_PACKET_SIZE USB_CDC_DATA_PACKET_SIZE
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
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) (uint8_t* DataBuf, uint16_t Len);
71 uint16_t (*pIf_DataRx) (uint8_t* DataBuf, uint16_t Len);
USB device class callback type define.
USB descriptor defines and function prototype.