| 1 |
/** |
| 2 |
****************************************************************************** |
| 3 |
* @file USBH_conf.h |
| 4 |
* @author MCD Application Team |
| 5 |
* @version V3.0.0 |
| 6 |
* @date 18-February-2014 |
| 7 |
* @brief General low level driver configuration |
| 8 |
****************************************************************************** |
| 9 |
* @attention |
| 10 |
* |
| 11 |
* <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> |
| 12 |
* |
| 13 |
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); |
| 14 |
* You may not use this file except in compliance with the License. |
| 15 |
* You may obtain a copy of the License at: |
| 16 |
* |
| 17 |
* http://www.st.com/software_license_agreement_liberty_v2 |
| 18 |
* |
| 19 |
* Unless required by applicable law or agreed to in writing, software |
| 20 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 21 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 22 |
* See the License for the specific language governing permissions and |
| 23 |
* limitations under the License. |
| 24 |
* |
| 25 |
****************************************************************************** |
| 26 |
*/ |
| 27 |
|
| 28 |
/* Define to prevent recursive inclusion -------------------------------------*/ |
| 29 |
#ifndef __USBH_CONF__H__ |
| 30 |
#define __USBH_CONF__H__ |
| 31 |
|
| 32 |
#include "stm32f4xx.h" |
| 33 |
#include <stdio.h> |
| 34 |
#include <stdlib.h> |
| 35 |
#include <string.h> |
| 36 |
|
| 37 |
/* Includes ------------------------------------------------------------------*/ |
| 38 |
|
| 39 |
/** @addtogroup USBH_OTG_DRIVER |
| 40 |
* @{ |
| 41 |
*/ |
| 42 |
|
| 43 |
/** @defgroup USBH_CONF |
| 44 |
* @brief usb otg low level driver configuration file |
| 45 |
* @{ |
| 46 |
*/ |
| 47 |
|
| 48 |
/** @defgroup USBH_CONF_Exported_Defines |
| 49 |
* @{ |
| 50 |
*/ |
| 51 |
|
| 52 |
#define USBH_MAX_NUM_ENDPOINTS 2 |
| 53 |
#define USBH_MAX_NUM_INTERFACES 2 |
| 54 |
#define USBH_MAX_NUM_CONFIGURATION 1 |
| 55 |
#define USBH_KEEP_CFG_DESCRIPTOR 1 |
| 56 |
#define USBH_MAX_NUM_SUPPORTED_CLASS 1 |
| 57 |
#define USBH_MAX_SIZE_CONFIGURATION 0x200 |
| 58 |
#define USBH_MAX_DATA_BUFFER 0x200 |
| 59 |
#define USBH_DEBUG_LEVEL 2 |
| 60 |
#define USBH_USE_OS 1 |
| 61 |
|
| 62 |
/** @defgroup USBH_Exported_Macros |
| 63 |
* @{ |
| 64 |
*/ |
| 65 |
|
| 66 |
/* Memory management macros */ |
| 67 |
#define USBH_malloc malloc |
| 68 |
#define USBH_free free |
| 69 |
#define USBH_memset memset |
| 70 |
#define USBH_memcpy memcpy |
| 71 |
|
| 72 |
/* DEBUG macros */ |
| 73 |
|
| 74 |
|
| 75 |
#if (USBH_DEBUG_LEVEL > 0) |
| 76 |
#define USBH_UsrLog(...) printf(__VA_ARGS__);\ |
| 77 |
printf("\n"); |
| 78 |
#else |
| 79 |
#define USBH_UsrLog(...) |
| 80 |
#endif |
| 81 |
|
| 82 |
|
| 83 |
#if (USBH_DEBUG_LEVEL > 1) |
| 84 |
|
| 85 |
#define USBH_ErrLog(...) printf("ERROR: ") ;\ |
| 86 |
printf(__VA_ARGS__);\ |
| 87 |
printf("\n"); |
| 88 |
#else |
| 89 |
#define USBH_ErrLog(...) |
| 90 |
#endif |
| 91 |
|
| 92 |
|
| 93 |
#if (USBH_DEBUG_LEVEL > 2) |
| 94 |
#define USBH_DbgLog(...) printf("DEBUG : ") ;\ |
| 95 |
printf(__VA_ARGS__);\ |
| 96 |
printf("\n"); |
| 97 |
#else |
| 98 |
#define USBH_DbgLog(...) |
| 99 |
#endif |
| 100 |
|
| 101 |
/** |
| 102 |
* @} |
| 103 |
*/ |
| 104 |
|
| 105 |
/** |
| 106 |
* @} |
| 107 |
*/ |
| 108 |
|
| 109 |
|
| 110 |
/** @defgroup USBH_CONF_Exported_Types |
| 111 |
* @{ |
| 112 |
*/ |
| 113 |
/** |
| 114 |
* @} |
| 115 |
*/ |
| 116 |
|
| 117 |
|
| 118 |
/** @defgroup USBH_CONF_Exported_Macros |
| 119 |
* @{ |
| 120 |
*/ |
| 121 |
/** |
| 122 |
* @} |
| 123 |
*/ |
| 124 |
|
| 125 |
/** @defgroup USBH_CONF_Exported_Variables |
| 126 |
* @{ |
| 127 |
*/ |
| 128 |
/** |
| 129 |
* @} |
| 130 |
*/ |
| 131 |
|
| 132 |
/** @defgroup USBH_CONF_Exported_FunctionsPrototype |
| 133 |
* @{ |
| 134 |
*/ |
| 135 |
/** |
| 136 |
* @} |
| 137 |
*/ |
| 138 |
|
| 139 |
|
| 140 |
#endif //__USBH_CONF__H__ |
| 141 |
|
| 142 |
|
| 143 |
/** |
| 144 |
* @} |
| 145 |
*/ |
| 146 |
|
| 147 |
/** |
| 148 |
* @} |
| 149 |
*/ |
| 150 |
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
| 151 |
|