Nirvana Jay / Mbed 2 deprecated F7DISCO_Demo

Dependencies:   BSP_DISCO_F746NG_patch mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usbh_conf.h Source File

usbh_conf.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    usbh_conf.h
00004   * @author  MCD Application Team
00005   * @version V1.1.0
00006   * @date    21-September-2015
00007   * @brief   General low level driver configuration
00008   ******************************************************************************
00009   * @attention
00010   *
00011   * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
00012   *
00013   * Redistribution and use in source and binary forms, with or without modification,
00014   * are permitted provided that the following conditions are met:
00015   *   1. Redistributions of source code must retain the above copyright notice,
00016   *      this list of conditions and the following disclaimer.
00017   *   2. Redistributions in binary form must reproduce the above copyright notice,
00018   *      this list of conditions and the following disclaimer in the documentation
00019   *      and/or other materials provided with the distribution.
00020   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00021   *      may be used to endorse or promote products derived from this software
00022   *      without specific prior written permission.
00023   *
00024   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00025   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00026   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00027   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00028   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00029   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00030   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00032   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00033   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034   *
00035   ******************************************************************************
00036   */
00037 
00038 /* Define to prevent recursive inclusion -------------------------------------*/
00039 #ifndef __USBH_CONF__H
00040 #define __USBH_CONF__H
00041 
00042 #include "stm32f7xx.h"
00043 #include <stdio.h>
00044 #include <stdlib.h>
00045 #include <string.h>
00046 
00047 /* Includes ------------------------------------------------------------------*/
00048 
00049 /** @addtogroup USBH_OTG_DRIVER
00050   * @{
00051   */
00052   
00053 /** @defgroup USBH_CONF
00054   * @brief usb otg low level driver configuration file
00055   * @{
00056   */ 
00057 
00058 /** @defgroup USBH_CONF_Exported_Defines
00059   * @{
00060   */ 
00061 
00062 #define USBH_MAX_NUM_ENDPOINTS                2
00063 #define USBH_MAX_NUM_INTERFACES               2
00064 #define USBH_MAX_NUM_CONFIGURATION            1
00065 #define USBH_MAX_NUM_SUPPORTED_CLASS          1
00066 #define USBH_KEEP_CFG_DESCRIPTOR              0
00067 #define USBH_MAX_SIZE_CONFIGURATION           0x200
00068 #define USBH_MAX_DATA_BUFFER                  0x200
00069 #define USBH_DEBUG_LEVEL                      0
00070 #define USBH_USE_OS                           1
00071     
00072 /** @defgroup USBH_Exported_Macros
00073   * @{
00074   */ 
00075 #if (USBH_USE_OS == 1)
00076   #include "cmsis_os.h"
00077   #define   USBH_PROCESS_PRIO    osPriorityNormal
00078     #define   USBH_PROCESS_STACK_SIZE    (128)
00079 #endif    
00080 
00081  /* Memory management macros */   
00082 #define USBH_malloc               malloc
00083 #define USBH_free                 free
00084 #define USBH_memset               memset
00085 #define USBH_memcpy               memcpy
00086     
00087  /* DEBUG macros */  
00088 
00089   
00090 #if (USBH_DEBUG_LEVEL > 0)
00091 #define  USBH_UsrLog(...)   printf(__VA_ARGS__);\
00092                             printf("\n");
00093 #else
00094 #define USBH_UsrLog(...)   
00095 #endif 
00096                             
00097                             
00098 #if (USBH_DEBUG_LEVEL > 1)
00099 
00100 #define  USBH_ErrLog(...)   printf("ERROR: ") ;\
00101                             printf(__VA_ARGS__);\
00102                             printf("\n");
00103 #else
00104 #define USBH_ErrLog(...)   
00105 #endif 
00106                             
00107                             
00108 #if (USBH_DEBUG_LEVEL > 2)                         
00109 #define  USBH_DbgLog(...)   printf("DEBUG : ") ;\
00110                             printf(__VA_ARGS__);\
00111                             printf("\n");
00112 #else
00113 #define USBH_DbgLog(...)                         
00114 #endif
00115                             
00116 /**
00117   * @}
00118   */ 
00119                               
00120                               
00121 
00122     
00123     
00124     
00125 /**
00126   * @}
00127   */ 
00128 
00129 
00130 /** @defgroup USBH_CONF_Exported_Types
00131   * @{
00132   */ 
00133 /**
00134   * @}
00135   */ 
00136 
00137 
00138 /** @defgroup USBH_CONF_Exported_Macros
00139   * @{
00140   */ 
00141 /**
00142   * @}
00143   */ 
00144 
00145 /** @defgroup USBH_CONF_Exported_Variables
00146   * @{
00147   */ 
00148 /**
00149   * @}
00150   */ 
00151 
00152 /** @defgroup USBH_CONF_Exported_FunctionsPrototype
00153   * @{
00154   */ 
00155 /**
00156   * @}
00157   */ 
00158 
00159 
00160 #endif /* __USBH_CONF__H */
00161 
00162 
00163 /**
00164   * @}
00165   */ 
00166 
00167 /**
00168   * @}
00169   */ 
00170 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
00171