2 ******************************************************************************
5 * @brief : Header for usbd_conf file.
6 ******************************************************************************
7 * COPYRIGHT(c) 2019 STMicroelectronics
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 * 1. Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright notice,
14 * this list of conditions and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ******************************************************************************
33 /* Define to prevent recursive inclusion -------------------------------------*/
34 #ifndef __USBD_CONF__H__
35 #define __USBD_CONF__H__
39 /* Includes ------------------------------------------------------------------*/
43 #include "stm32f2xx.h"
44 #include "stm32f2xx_hal.h"
46 /** @addtogroup USBD_OTG_DRIVER
50 /** @defgroup USBD_CONF
51 * @brief usb otg low level driver configuration file
55 /** @defgroup USBD_CONF_Exported_Defines
59 /*---------- -----------*/
60 #define USBD_MAX_NUM_INTERFACES 2
61 /*---------- -----------*/
62 #define USBD_MAX_NUM_CONFIGURATION 1
63 /*---------- -----------*/
64 #define USBD_MAX_STR_DESC_SIZ 512
65 /*---------- -----------*/
66 #define USBD_SUPPORT_USER_STRING 0
67 /*---------- -----------*/
68 #define USBD_DEBUG_LEVEL 0
69 /*---------- -----------*/
70 #define USBD_LPM_ENABLED 0
71 /*---------- -----------*/
72 #define USBD_SELF_POWERED 1
74 /****************************************/
75 /* #define for FS and HS identification */
79 /** @defgroup USBD_Exported_Macros
83 /* Memory management macros */
84 #define USBD_malloc malloc
85 #define USBD_free free
86 #define USBD_memset memset
87 #define USBD_memcpy memcpy
89 #define USBD_Delay HAL_Delay
93 #if (USBD_DEBUG_LEVEL > 0)
94 #define USBD_UsrLog(...) printf(__VA_ARGS__);\
97 #define USBD_UsrLog(...)
101 #if (USBD_DEBUG_LEVEL > 1)
103 #define USBD_ErrLog(...) printf("ERROR: ") ;\
104 printf(__VA_ARGS__);\
107 #define USBD_ErrLog(...)
111 #if (USBD_DEBUG_LEVEL > 2)
112 #define USBD_DbgLog(...) printf("DEBUG : ") ;\
113 printf(__VA_ARGS__);\
116 #define USBD_DbgLog(...)
129 /** @defgroup USBD_CONF_Exported_Types
136 /** @defgroup USBD_CONF_Exported_Macros
143 /** @defgroup USBD_CONF_Exported_Variables
150 /** @defgroup USBD_CONF_Exported_FunctionsPrototype
160 #endif //__USBD_CONF__H__
169 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/