USB CDC library for MBED on STM32
Embed:
(wiki syntax)
Show/hide line numbers
usbd_conf.h
00001 /** 00002 ****************************************************************************** 00003 * @file usbd_conf_template.h 00004 * @author MCD Application Team 00005 * @version V2.4.2 00006 * @date 11-December-2015 00007 * @brief Header file for the usbd_conf_template.c file 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2> 00012 * 00013 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00014 * You may not use this file except in compliance with the License. 00015 * You may obtain a copy of the License at: 00016 * 00017 * http://www.st.com/software_license_agreement_liberty_v2 00018 * 00019 * Unless required by applicable law or agreed to in writing, software 00020 * distributed under the License is distributed on an "AS IS" BASIS, 00021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00022 * See the License for the specific language governing permissions and 00023 * limitations under the License. 00024 * 00025 ****************************************************************************** 00026 */ 00027 00028 /* Define to prevent recursive inclusion -------------------------------------*/ 00029 #ifndef __USBD_CONF_TEMPLATE_H 00030 #define __USBD_CONF_TEMPLATE_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 /* Includes ------------------------------------------------------------------*/ 00037 #include "stm32f4xx.h" /* replace 'stm32xxx' with your HAL driver header filename, ex: stm32f4xx.h */ 00038 #include <stdio.h> 00039 #include <stdlib.h> 00040 #include <string.h> 00041 00042 /** @addtogroup STM32_USB_DEVICE_LIBRARY 00043 * @{ 00044 */ 00045 00046 /** @defgroup USBD_CONF 00047 * @brief USB device low level driver configuration file 00048 * @{ 00049 */ 00050 00051 /** @defgroup USBD_CONF_Exported_Defines 00052 * @{ 00053 */ 00054 00055 #define USBD_MAX_NUM_INTERFACES 1 00056 #define USBD_MAX_NUM_CONFIGURATION 1 00057 #define USBD_MAX_STR_DESC_SIZ 0x100 00058 #define USBD_SUPPORT_USER_STRING 0 00059 #define USBD_SELF_POWERED 1 00060 #define USBD_DEBUG_LEVEL 2 00061 00062 /* MSC Class Config */ 00063 #define MSC_MEDIA_PACKET 8192 00064 00065 /* CDC Class Config */ 00066 #define USBD_CDC_INTERVAL 2000 00067 00068 /* DFU Class Config */ 00069 #define USBD_DFU_MAX_ITF_NUM 1 00070 #define USBD_DFU_XFERS_IZE 1024 00071 00072 /* AUDIO Class Config */ 00073 #define USBD_AUDIO_FREQ 22100 00074 00075 /** @defgroup USBD_Exported_Macros 00076 * @{ 00077 */ 00078 00079 /* Memory management macros */ 00080 #define USBD_malloc malloc 00081 #define USBD_free free 00082 #define USBD_memset memset 00083 #define USBD_memcpy memcpy 00084 00085 /* DEBUG macros */ 00086 00087 00088 #if (USBD_DEBUG_LEVEL > 0) 00089 #define USBD_UsrLog(...) printf(__VA_ARGS__);\ 00090 printf("\n"); 00091 #else 00092 #define USBD_UsrLog(...) 00093 #endif 00094 00095 00096 #if (USBD_DEBUG_LEVEL > 1) 00097 00098 #define USBD_ErrLog(...) printf("ERROR: ") ;\ 00099 printf(__VA_ARGS__);\ 00100 printf("\n"); 00101 #else 00102 #define USBD_ErrLog(...) 00103 #endif 00104 00105 00106 #if (USBD_DEBUG_LEVEL > 2) 00107 #define USBD_DbgLog(...) printf("DEBUG : ") ;\ 00108 printf(__VA_ARGS__);\ 00109 printf("\n"); 00110 #else 00111 #define USBD_DbgLog(...) 00112 #endif 00113 00114 /** 00115 * @} 00116 */ 00117 00118 00119 00120 /** 00121 * @} 00122 */ 00123 00124 00125 /** @defgroup USBD_CONF_Exported_Types 00126 * @{ 00127 */ 00128 /** 00129 * @} 00130 */ 00131 00132 00133 /** @defgroup USBD_CONF_Exported_Macros 00134 * @{ 00135 */ 00136 /** 00137 * @} 00138 */ 00139 00140 /** @defgroup USBD_CONF_Exported_Variables 00141 * @{ 00142 */ 00143 /** 00144 * @} 00145 */ 00146 00147 /** @defgroup USBD_CONF_Exported_FunctionsPrototype 00148 * @{ 00149 */ 00150 /** 00151 * @} 00152 */ 00153 00154 #ifdef __cplusplus 00155 } 00156 #endif 00157 00158 #endif /* __USBD_CONF_TEMPLATE_H */ 00159 00160 00161 /** 00162 * @} 00163 */ 00164 00165 /** 00166 * @} 00167 */ 00168 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00169 00170
Generated on Thu Jul 14 2022 15:47:45 by 1.7.2