GD32F1x0: USB/GD32_USB_Device_Library/Core/inc/usbd_conf_template.h Source File

GD32F1x0

usbd_conf_template.h
Go to the documentation of this file.
1 
11 /* Define to prevent recursive inclusion -------------------------------------*/
12 #ifndef __GD32F1X0_USBD_CONF_TEMPLATE_H
13 #define __GD32F1X0_USBD_CONF_TEMPLATE_H
14 
15 /* Includes ------------------------------------------------------------------*/
16 #include "usb_conf.h"
17 
34 /*Common Defines*/
35 #define USBD_SELF_POWERED
36 #define USBD_CFG_MAX_NUM 1
37 
38 /*Audio Class user defines*/
39 #define AUDIO_TOTAL_IF_NUM 0x02
40 #define USBD_ITF_MAX_NUM 1
41 #define USB_STR_DESC_MAX_SIZE 200
42 #define AUDIO_OUT_EP EP1_OUT
43 
44 /*CCID Class user defines*/
45 #define USBD_ITF_MAX_NUM 1
46 #define USB_MAX_STR_DESC_SIZ 64
47 #define CCID_BULK_EP_MAX_PACKET 64
48 #define CCID_INTR_EP_MAX_PACKET 8
49 #define CCID_BULK_IN_EP EP1_IN
50 #define CCID_BULK_OUT_EP EP1_OUT
51 #define CCID_INTR_IN_EP EP2_IN
52 #define USB_SUPPORT_USER_STRING_DESC
53 
54 /*Composite HID + CDC Classes user defines*/
55 #define USBD_ITF_MAX_NUM 1
56 #define USB_STR_DESC_MAX_SIZE 64
57 #define CUSTOMHID_REPORT_DESC_SIZE 163
58 #define CUSTOMHID_CONFIG_DESC_SIZE 41
59 #define HID_IN_EP EP1_IN
60 #define HID_OUT_EP EP1_OUT
61 
62 /*2 Bytes max*/
63 #define HID_IN_PACKET 2
64 #define HID_OUT_PACKET 2
65 #define CDC_IN_EP EP1_IN
66 #define CDC_OUT_EP EP3_OUT
67 #define CDC_CMD_EP EP2_IN
69 /* CDC endpoints parameters: you can fine tune these values depending on the needed baudrate and performance. */
70 #define CDC_DATA_MAX_PACKET_SIZE 64
71 #define CDC_CMD_PACKET_SIZE 8
72 #define CDC_IN_FRAME_INTERVAL 5
73 #define APP_RX_DATA_SIZE 2048
75 #define APP_FOPS VCP_fops
76 
77 /* Composite HID + MSC class user defines */
78 #define USBD_ITF_MAX_NUM 1
79 #define USB_MAX_STR_DESC_SIZE 64
80 #define CUSTOMHID_REPORT_DESC_SIZE 163
81 #define CUSTOMHID_CONFIG_DESC_SIZE 41
82 #define HID_IN_EP EP1_IN
83 #define HID_OUT_EP EP1_OUT
84 
85 /* HID class user defines */
86 #define HID_IN_PACKET 4
87 #define HID_OUT_PACKET 4
88 #define MSC_MAX_PACKET 64
89 #define MSC_MEDIA_PACKET 512
90 #define MSC_IN_EP EP2_IN
91 #define MSC_OUT_EP EP2_OUT
92 
93 /* Custom HID class user defines */
94 #define USBD_ITF_MAX_NUM 1
95 #define USB_STR_DESC_MAX_SIZE 64
96 #define CUSTOMHID_REPORT_DESC_SIZE 163
97 #define CUSTOMHID_CONFIG_DESC_SIZE 41
98 #define HID_IN_PACKET 2
99 #define HID_OUT_PACKET 2
100 #define HID_IN_EP EP1_IN
101 #define HID_OUT_EP EP1_OUT
102 
103 /*DFU class user defines*/
104 #define USBD_ITF_MAX_NUM MAX_USED_MEDIA
105 #define USB_MAX_STR_DESC_SIZE 200
106 #define XFERSIZE 1024
107 #define MAX_USED_MEDIA 1
108 #define DFU_IN_EP EP0_IN
109 #define DFU_OUT_EP EP0_OUT
110 #define USB_SUPPORT_USER_STRING_DESC
111 
112 /* Flash memory address from where user application will be loaded
113  This address represents the DFU code protected against write and erase operations.*/
114 #define APP_DEFAULT_ADD 0x08003000
115 #define DFU_MAL_IS_PROTECTED_AREA(add) (uint8_t)(((add >= 0x08000000) && (add < (APP_DEFAULT_ADD)))? 1:0)
116 #define TRANSFER_SIZE_BYTES(size) ((uint8_t)(size)), \
117  ((uint8_t)(size >> 8))
118 
119 /*MSC Class user defines*/
120 #define USBD_ITF_MAX_NUM 1
121 #define USB_STR_DESC_MAX_SIZE 64
122 #define MSC_MAX_PACKET 64
123 #define MSC_MEDIA_PACKET 512
124 #define MSC_IN_EP EP1_IN
125 #define MSC_OUT_EP EP2_OUT
126 
127 /*VCP Class user defines*/
128 #define USBD_ITF_MAX_NUM 1
129 #define USB_MAX_STR_DESC_SIZ 255
130 #define CDC_IN_EP EP1_IN
131 #define CDC_OUT_EP EP3_OUT
132 #define CDC_CMD_EP EP2_IN
134 /* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrate and performance. */
135 #define CDC_DATA_MAX_PACKET_SIZE 64
136 #define CDC_CMD_PACKET_SZE 8
137 #define CDC_IN_FRAME_INTERVAL 5
138 #define APP_RX_DATA_SIZE 2048
140 #define APP_FOPS VCP_fops
141 
146 #endif /* __GD32F1X0_USBD_CONF_TEMPLATE_H */
147 
160 /************************ (C) COPYRIGHT 2014 GIGADEVICE *****END OF FILE****/
Generated by   doxygen 1.8.10