Go to the documentation of this file. 23 #ifndef __USB_CONF__H__ 24 #define __USB_CONF__H__ 27 #include "stm32f4xx.h" 55 #ifndef USE_USB_OTG_FS 56 #define USE_USB_OTG_FS 60 #define USB_OTG_FS_CORE 100 #ifdef USB_OTG_FS_CORE 101 #define RX_FIFO_FS_SIZE 128 102 #define TX0_FIFO_FS_SIZE 64 103 #define TX1_FIFO_FS_SIZE 128 104 #define TX2_FIFO_FS_SIZE 0 105 #define TX3_FIFO_FS_SIZE 0 114 #define USE_DEVICE_MODE 118 #ifndef USB_OTG_FS_CORE 119 #ifndef USB_OTG_HS_CORE 120 #error "USB_OTG_HS_CORE or USB_OTG_FS_CORE should be defined" 125 #ifndef USE_DEVICE_MODE 126 #ifndef USE_HOST_MODE 127 #error "USE_DEVICE_MODE or USE_HOST_MODE should be defined" 131 #ifndef USE_USB_OTG_HS 132 #ifndef USE_USB_OTG_FS 133 #error "USE_USB_OTG_HS or USE_USB_OTG_FS should be defined" 135 #else //USE_USB_OTG_HS 137 #ifndef USE_EMBEDDED_PHY 139 #error "USE_ULPI_PHY or USE_EMBEDDED_PHY or USE_I2C_PHY should be defined" 148 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 149 #if defined (__GNUC__) 150 #define __ALIGN_END __attribute__ ((aligned (4))) 151 #define __ALIGN_BEGIN 154 #if defined (__CC_ARM) 155 #define __ALIGN_BEGIN __align(4) 156 #elif defined (__ICCARM__) 157 #define __ALIGN_BEGIN 158 #elif defined (__TASKING__) 159 #define __ALIGN_BEGIN __align(4) 163 #define __ALIGN_BEGIN 168 #if defined (__CC_ARM) 169 #define __packed __packed 170 #elif defined (__ICCARM__) 171 #define __packed __packed 172 #elif defined ( __GNUC__ ) 174 #define __packed __attribute__ ((__packed__)) 176 #elif defined (__TASKING__) 177 #define __packed __unaligned 183 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 184 #if defined (__GNUC__) 185 #define __ALIGN_END __attribute__ ((aligned (4))) 186 #define __ALIGN_BEGIN 189 #if defined (__CC_ARM) 190 #define __ALIGN_BEGIN __align(4) 191 #elif defined (__ICCARM__) 192 #define __ALIGN_BEGIN 193 #elif defined (__TASKING__) 194 #define __ALIGN_BEGIN __align(4) 198 #define __ALIGN_BEGIN 203 #if defined (__CC_ARM) 204 #define __packed __packed 205 #elif defined (__ICCARM__) 206 #define __packed __packed 207 #elif defined ( __GNUC__ ) 209 #define __packed __attribute__((__packed__)) 211 #elif defined (__TASKING__) 212 #define __packed __unaligned 215 #define MIN(a,b) (((a)<(b))?(a):(b)) 252 #endif //__USB_CONF__H__