APM:Libraries
usbd_conf.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USBD_CONF__H__
30 #define __USBD_CONF__H__
31 
32 /* Includes ------------------------------------------------------------------*/
33 #include "usb_conf.h"
34 
38 #define USBD_CFG_MAX_NUM 1
39 #define USBD_ITF_MAX_NUM 1
40 
41 #define USBD_SELF_POWERED
42 
43 #define USB_MAX_STR_DESC_SIZ 255
44 
48 #define CDC_IN_EP 0x81 /* EP1 for data IN */
49 #define CDC_OUT_EP 0x01 /* EP1 for data OUT */
50 #define CDC_CMD_EP 0x82 /* EP2 for CDC commands */
51 
52 /* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */
53 #ifdef USE_USB_OTG_HS
54  #define CDC_DATA_MAX_PACKET_SIZE 512 /* Endpoint IN & OUT Packet size */
55  #define CDC_CMD_PACKET_SZE 8 /* Control Endpoint Packet size */
56 
57  #define CDC_IN_FRAME_INTERVAL 40 /* Number of micro-frames between IN transfers */
58  #define APP_RX_DATA_SIZE 2048 /* Total size of IN buffer:
59  APP_RX_DATA_SIZE*8/MAX_BAUDARATE*1000 should be > CDC_IN_FRAME_INTERVAL*8 */
60 #else
61  #define CDC_DATA_MAX_PACKET_SIZE 64 /* Endpoint IN & OUT Packet size */
62  #define CDC_CMD_PACKET_SZE 8 /* Control Endpoint Packet size */
63 
64  #define CDC_IN_FRAME_INTERVAL 5 /* Number of frames between IN transfers */
65  #define APP_RX_DATA_SIZE 2048 /* Total size of IN buffer:
66  APP_RX_DATA_SIZE*8/MAX_BAUDARATE*1000 should be > CDC_IN_FRAME_INTERVAL */
67 #endif /* USE_USB_OTG_HS */
68 
69 #define APP_FOPS VCP_fops
70 
71 
72 
73 
74 
75 //[ for MSC
76 
77 //#define USBD_CFG_MAX_NUM 1
78 //#define USBD_ITF_MAX_NUM 1
79 //#define USB_MAX_STR_DESC_SIZ 64
80 //#define USBD_SELF_POWERED
81 
82 /* Class Layer Parameter */
83 
84 #define MSC_IN_EP 0x81
85 #define MSC_OUT_EP 0x01
86 #ifdef USE_USB_OTG_HS
87 #ifdef USE_ULPI_PHY
88 #define MSC_MAX_PACKET 512
89 #else
90 #define MSC_MAX_PACKET 64
91 #endif
92 #else /*USE_USB_OTG_FS*/
93 #define MSC_MAX_PACKET 64
94 #endif
95 
96 
97 #define MSC_MEDIA_PACKET 4096
98 //]
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
144 #endif //__USBD_CONF__H__
145 
146 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
147 
General low level driver configuration.