Improve generic & stm32f4 demos
[lwext4.git] / demos / stm32f429_disco / stm / usb_user / usbh_conf.h
1 /**\r
2   ******************************************************************************\r
3   * @file    FatFs/FatFs_USBDisk/Inc/usbh_conf.h\r
4   * @author  MCD Application Team\r
5   * @version V1.0.1\r
6   * @date    26-February-2014\r
7   * @brief   General low level driver configuration\r
8   ******************************************************************************\r
9   * @attention\r
10   *\r
11   * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>\r
12   *\r
13   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");\r
14   * You may not use this file except in compliance with the License.\r
15   * You may obtain a copy of the License at:\r
16   *\r
17   *        http://www.st.com/software_license_agreement_liberty_v2\r
18   *\r
19   * Unless required by applicable law or agreed to in writing, software \r
20   * distributed under the License is distributed on an "AS IS" BASIS, \r
21   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
22   * See the License for the specific language governing permissions and\r
23   * limitations under the License.\r
24   *\r
25   ******************************************************************************\r
26   */\r
27 \r
28 /* Define to prevent recursive inclusion -------------------------------------*/\r
29 #ifndef __USBH_CONF__H__\r
30 #define __USBH_CONF__H__\r
31 \r
32 /* Includes ------------------------------------------------------------------*/\r
33 #include "stm32f4xx.h"\r
34 #include <stdio.h>\r
35 #include <stdlib.h>\r
36 #include <string.h>\r
37 \r
38 /* Exported types ------------------------------------------------------------*/\r
39 #define USBH_MAX_NUM_ENDPOINTS                2\r
40 #define USBH_MAX_NUM_INTERFACES               2\r
41 #define USBH_MAX_NUM_CONFIGURATION            1\r
42 #define USBH_MAX_NUM_SUPPORTED_CLASS          1\r
43 #define USBH_KEEP_CFG_DESCRIPTOR              0\r
44 #define USBH_MAX_SIZE_CONFIGURATION           0x200\r
45 #define USBH_MAX_DATA_BUFFER                  0x200\r
46 #define USBH_DEBUG_LEVEL                      0\r
47 #define USBH_USE_OS                           0\r
48     \r
49 /* Exported constants --------------------------------------------------------*/\r
50 /* Exported macro ------------------------------------------------------------*/\r
51 /* CMSIS OS macros */   \r
52 #if (USBH_USE_OS == 1)\r
53   #include "cmsis_os.h"\r
54   #define   USBH_PROCESS_PRIO    osPriorityNormal\r
55 #endif\r
56 \r
57  /* Memory management macros */   \r
58 #define USBH_malloc               malloc\r
59 #define USBH_free                 free\r
60 #define USBH_memset               memset\r
61 #define USBH_memcpy               memcpy\r
62     \r
63  /* DEBUG macros */  \r
64 #if (USBH_DEBUG_LEVEL > 0)\r
65 #define  USBH_UsrLog(...)   printf(__VA_ARGS__);\\r
66                             printf("\n");\r
67 #else\r
68 #define USBH_UsrLog(...)   \r
69 #endif \r
70                             \r
71                             \r
72 #if (USBH_DEBUG_LEVEL > 1)\r
73 \r
74 #define  USBH_ErrLog(...)   printf("ERROR: ") ;\\r
75                             printf(__VA_ARGS__);\\r
76                             printf("\n");\r
77 #else\r
78 #define USBH_ErrLog(...)   \r
79 #endif\r
80 \r
81 #if (USBH_DEBUG_LEVEL > 2)                         \r
82 #define  USBH_DbgLog(...)   printf("DEBUG : ") ;\\r
83                             printf(__VA_ARGS__);\\r
84                             printf("\n");\r
85 #else\r
86 #define USBH_DbgLog(...)                         \r
87 #endif\r
88                             \r
89 /* Exported functions ------------------------------------------------------- */\r
90 \r
91 #endif /* __USB_CONF_H */\r
92 \r
93 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r