2 ******************************************************************************
4 * @author MCD Application Team
7 * @brief USB Device configuration file
8 ******************************************************************************
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
19 ******************************************************************************
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __USBD_CONF__H__
24 #define __USBD_CONF__H__
26 /* Includes ------------------------------------------------------------------*/
27 #include "stm32f4xx.h"
29 /** @defgroup USB_CONF_Exported_Defines
32 #define USBD_CFG_MAX_NUM 1
33 #define USBD_ITF_MAX_NUM 1
34 #define USB_MAX_STR_DESC_SIZ 255
36 /** @defgroup USB_VCP_Class_Layer_Parameter
39 #define CDC_IN_EP 0x81 /* EP1 for data IN */
40 #define CDC_OUT_EP 0x01 /* EP1 for data OUT */
41 #define CDC_CMD_EP 0x82 /* EP2 for CDC commands */
43 #define HID_IN_EP 0x83
44 #define HID_IN_PACKET 8
46 /* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */
48 #define CDC_DATA_MAX_PACKET_SIZE 512 /* Endpoint IN & OUT Packet size */
49 #define CDC_CMD_PACKET_SZE 8 /* Control Endpoint Packet size */
51 #define CDC_IN_FRAME_INTERVAL 40 /* Number of micro-frames between IN transfers */
52 #define APP_RX_DATA_SIZE 2048 /* Total size of IN buffer:
53 APP_RX_DATA_SIZE*8/MAX_BAUDARATE*1000 should be > CDC_IN_FRAME_INTERVAL*8 */
54 #define APP_TX_DATA_SIZE 2048 /* total size of the OUT (inbound to FC) buffer */
56 #define CDC_DATA_MAX_PACKET_SIZE 64 /* Endpoint IN & OUT Packet size */
57 #define CDC_CMD_PACKET_SZE 8 /* Control Endpoint Packet size */
59 #define CDC_IN_FRAME_INTERVAL 15 /* Number of frames between IN transfers */
60 #define APP_RX_DATA_SIZE 2048 /* Total size of IN (outbound from FC) buffer:
61 APP_RX_DATA_SIZE*8/MAX_BAUDARATE*1000 should be > CDC_IN_FRAME_INTERVAL */
62 #define APP_TX_DATA_SIZE 2048 /* total size of the OUT (inbound to FC) buffer */
63 #endif /* USE_USB_OTG_HS */
66 #define MSC_IN_EP 0x81
67 #define MSC_OUT_EP 0x01
70 #define MSC_MAX_PACKET 512
72 #define MSC_MAX_PACKET 64
74 #else /*USE_USB_OTG_FS*/
75 #define MSC_MAX_PACKET 64
79 #define MSC_MEDIA_PACKET 4096
82 #define APP_FOPS VCP_fops
87 /** @defgroup USB_CONF_Exported_Types
95 /** @defgroup USB_CONF_Exported_Macros
102 /** @defgroup USB_CONF_Exported_Variables
109 /** @defgroup USB_CONF_Exported_FunctionsPrototype
117 #endif //__USBD_CONF__H__
119 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/