Merge pull request #11297 from SteveCEvans/baro_state
[betaflight.git] / src / main / vcpf4 / usbd_conf.h
blobe29b0195899c3b4f9b17d77438b801808a58820a
1 /**
2 ******************************************************************************
3 * @file usbd_conf.h
4 * @author MCD Application Team
5 * @version V1.0.0
6 * @date 22-July-2011
7 * @brief USB Device configuration file
8 ******************************************************************************
9 * @attention
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>&copy; 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
30 * @{
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
37 * @{
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 9
46 /* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */
47 #ifdef USE_USB_OTG_HS
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 */
55 #else
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 */
65 /* MSC */
66 #define MSC_IN_EP 0x81
67 #define MSC_OUT_EP 0x01
68 #ifdef USE_USB_OTG_HS
69 #ifdef USE_ULPI_PHY
70 #define MSC_MAX_PACKET 512
71 #else
72 #define MSC_MAX_PACKET 64
73 #endif
74 #else /*USE_USB_OTG_FS*/
75 #define MSC_MAX_PACKET 64
76 #endif
79 #define MSC_MEDIA_PACKET 4096
80 /* END MSC */
82 #define APP_FOPS VCP_fops
83 /**
84 * @}
87 /** @defgroup USB_CONF_Exported_Types
88 * @{
90 /**
91 * @}
95 /** @defgroup USB_CONF_Exported_Macros
96 * @{
98 /**
99 * @}
102 /** @defgroup USB_CONF_Exported_Variables
103 * @{
106 * @}
109 /** @defgroup USB_CONF_Exported_FunctionsPrototype
110 * @{
113 * @}
117 #endif //__USBD_CONF__H__
119 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/