GD32F1x0: USB/GD32_USB_Device_Library/Class/cdc/inc/usbd_cdc_loopback_core.h Source File

GD32F1x0

usbd_cdc_loopback_core.h
Go to the documentation of this file.
1 
11 /* Define to prevent recursive inclusion -------------------------------------*/
12 #ifndef __GD32F1X0_USBD_CDC_LOOPBACK_CORE_H
13 #define __GD32F1X0_USBD_CDC_LOOPBACK_CORE_H
14 
15 /* Includes ------------------------------------------------------------------*/
16 #include "usbd_desc.h"
17 
37 #define USB_CDC_CONFIG_DESC_SIZE (67)
38 #define USB_CDC_DESC_SIZE (58)
39 
40 #define CDC_DESC_TYPE 0x21
41 
42 #define CDC_DATA_IN_PACKET_SIZE USB_CDC_DATA_PACKET_SIZE
43 #define CDC_DATA_OUT_PACKET_SIZE USB_CDC_DATA_PACKET_SIZE
44 
45 /* CDC Requests */
46 #define SEND_ENCAPSULATED_COMMAND 0x00
47 #define GET_ENCAPSULATED_RESPONSE 0x01
48 #define SET_COMM_FEATURE 0x02
49 #define GET_COMM_FEATURE 0x03
50 #define CLEAR_COMM_FEATURE 0x04
51 #define SET_LINE_CODING 0x20
52 #define GET_LINE_CODING 0x21
53 #define SET_CONTROL_LINE_STATE 0x22
54 #define SEND_BREAK 0x23
55 #define NO_CMD 0xFF
56 
64 /* Virtual ComPort configured parameters */
65 typedef struct
66 {
67  uint32_t dwDTERate; /* Data terminal rate */
68  uint8_t bCharFormat; /* Stop bits */
69  uint8_t bParityType; /* Parity */
70  uint8_t bDataBits; /* Data bits */
71 }
73 
81 extern USBD_Class_cb_TypeDef USBD_CDC_cb;
82 
90 void USBD_CDC_SendData (void *pudev, uint32_t DataLen);
91 void USBD_CDC_ReceiveData (void *pudev);
92 
97 #endif /* __GD32F1X0_USBD_CDC_CORE_H */
98 
115 /************************ (C) COPYRIGHT 2014 GIGADEVICE *****END OF FILE****/
USB device class callback type define.
Definition: usb_core.h:153
void USBD_CDC_SendData(void *pudev, uint32_t DataLen)
Send the data received from the GD32 to the PC through USB.
void USBD_CDC_ReceiveData(void *pudev)
Receive the data from the PC to GD32 and send it through USB.
USB descriptor defines and function prototype.
Generated by   doxygen 1.8.10