2 #if (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE)
31 #ifndef __USB_CONF__H__
32 #define __USB_CONF__H__
35 #include "config/usb_conf.h"
61 #ifndef USE_USB_OTG_FS
66 #define USB_OTG_FS_CORE
86 #ifndef USE_USB_OTG_HS
94 #ifndef USE_EMBEDDED_PHY
99 #define USB_OTG_HS_CORE
156 #ifdef USB_OTG_HS_CORE
157 #define RX_FIFO_HS_SIZE 512
158 #define TX0_FIFO_HS_SIZE 512
159 #define TX1_FIFO_HS_SIZE 512
160 #define TX2_FIFO_HS_SIZE 0
161 #define TX3_FIFO_HS_SIZE 0
162 #define TX4_FIFO_HS_SIZE 0
163 #define TX5_FIFO_HS_SIZE 0
164 #define TXH_NP_HS_FIFOSIZ 96
165 #define TXH_P_HS_FIFOSIZ 96
171 #define USB_OTG_EXTERNAL_VBUS_ENABLED
174 #define USB_OTG_ULPI_PHY_ENABLED
176 #ifdef USE_EMBEDDED_PHY
177 #define USB_OTG_EMBEDDED_PHY_ENABLED
179 #define USB_OTG_HS_INTERNAL_DMA_ENABLED
180 #define USB_OTG_HS_DEDICATED_EP1_ENABLED
184 #ifdef USB_OTG_FS_CORE
185 #define RX_FIFO_FS_SIZE 128
186 #define TX0_FIFO_FS_SIZE 64
187 #define TX1_FIFO_FS_SIZE 128
188 #define TX2_FIFO_FS_SIZE 0
189 #define TX3_FIFO_FS_SIZE 0
190 #define TXH_NP_HS_FIFOSIZ 96
191 #define TXH_P_HS_FIFOSIZ 96
202 #define USE_DEVICE_MODE
205 #ifndef USB_OTG_FS_CORE
206 #ifndef USB_OTG_HS_CORE
207 #error "USB_OTG_HS_CORE or USB_OTG_FS_CORE should be defined"
211 #ifndef USE_DEVICE_MODE
212 #ifndef USE_HOST_MODE
213 #error "USE_DEVICE_MODE or USE_HOST_MODE should be defined"
217 #ifndef USE_USB_OTG_HS
218 #ifndef USE_USB_OTG_FS
219 #error "USE_USB_OTG_HS or USE_USB_OTG_FS should be defined"
221 #else //USE_USB_OTG_HS
223 #ifndef USE_EMBEDDED_PHY
224 #error "USE_ULPI_PHY or USE_EMBEDDED_PHY should be defined"
232 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED
233 #if defined (__GNUC__)
234 #define __ALIGN_END __attribute__ ((aligned (4)))
235 #define __ALIGN_BEGIN
238 #if defined (__CC_ARM)
239 #define __ALIGN_BEGIN __align(4)
240 #elif defined (__ICCARM__)
241 #define __ALIGN_BEGIN
242 #elif defined (__TASKING__)
243 #define __ALIGN_BEGIN __align(4)
247 #define __ALIGN_BEGIN
252 #if defined (__CC_ARM)
253 #define __packed __packed
254 #elif defined (__ICCARM__)
255 #define __packed __packed
256 #elif defined ( __GNUC__ )
257 #define __packed __attribute__ ((__packed__))
258 #elif defined (__TASKING__)
259 #define __packed __unaligned
297 #endif //__USB_CONF__H__
libheivs configuration file