Subversion Repositories DashDisplay

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /**
  2.   ******************************************************************************
  3.   * @file    usbd_conf_template.h
  4.   * @author  MCD Application Team
  5.   * @version V2.4.1
  6.   * @date    19-June-2015
  7.   * @brief   Header file for the usbd_conf_template.c file
  8.   ******************************************************************************
  9.   * @attention
  10.   *
  11.   * <h2><center>&copy; COPYRIGHT 2015 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 __USBD_CONF_TEMPLATE_H
  30. #define __USBD_CONF_TEMPLATE_H
  31.  
  32. #ifdef __cplusplus
  33.  extern "C" {
  34. #endif
  35.  
  36. /* Includes ------------------------------------------------------------------*/
  37. #include "stm32fxxx.h"  /* replace 'stm32xxx' with your HAL driver header filename, ex: stm32f4xx.h */
  38. #include <stdio.h>
  39. #include <stdlib.h>
  40. #include <string.h>
  41.  
  42. /** @addtogroup STM32_USB_DEVICE_LIBRARY
  43.   * @{
  44.   */
  45.  
  46. /** @defgroup USBD_CONF
  47.   * @brief USB device low level driver configuration file
  48.   * @{
  49.   */
  50.  
  51. /** @defgroup USBD_CONF_Exported_Defines
  52.   * @{
  53.   */
  54.  
  55. #define USBD_MAX_NUM_INTERFACES               1
  56. #define USBD_MAX_NUM_CONFIGURATION            1
  57. #define USBD_MAX_STR_DESC_SIZ                 0x100
  58. #define USBD_SUPPORT_USER_STRING              0
  59. #define USBD_SELF_POWERED                     1
  60. #define USBD_DEBUG_LEVEL                      2
  61.  
  62. /* MSC Class Config */
  63. #define MSC_MEDIA_PACKET                       8192  
  64.  
  65. /* CDC Class Config */
  66. #define USBD_CDC_INTERVAL                      2000  
  67.  
  68.  /* DFU Class Config */
  69. #define USBD_DFU_MAX_ITF_NUM                   1
  70. #define USBD_DFU_XFERS_IZE                     1024
  71.  
  72.  /* AUDIO Class Config */
  73. #define USBD_AUDIO_FREQ                       22100
  74.  
  75. /** @defgroup USBD_Exported_Macros
  76.   * @{
  77.   */
  78.  
  79.  /* Memory management macros */  
  80. #define USBD_malloc               malloc
  81. #define USBD_free                 free
  82. #define USBD_memset               memset
  83. #define USBD_memcpy               memcpy
  84.    
  85.  /* DEBUG macros */  
  86.  
  87.  
  88. #if (USBD_DEBUG_LEVEL > 0)
  89. #define  USBD_UsrLog(...)   printf(__VA_ARGS__);\
  90.                             printf("\n");
  91. #else
  92. #define USBD_UsrLog(...)  
  93. #endif
  94.                            
  95.                            
  96. #if (USBD_DEBUG_LEVEL > 1)
  97.  
  98. #define  USBD_ErrLog(...)   printf("ERROR: ") ;\
  99.                             printf(__VA_ARGS__);\
  100.                             printf("\n");
  101. #else
  102. #define USBD_ErrLog(...)  
  103. #endif
  104.                            
  105.                            
  106. #if (USBD_DEBUG_LEVEL > 2)                        
  107. #define  USBD_DbgLog(...)   printf("DEBUG : ") ;\
  108.                             printf(__VA_ARGS__);\
  109.                             printf("\n");
  110. #else
  111. #define USBD_DbgLog(...)                        
  112. #endif
  113.                            
  114. /**
  115.   * @}
  116.   */
  117.  
  118.    
  119.    
  120. /**
  121.   * @}
  122.   */
  123.  
  124.  
  125. /** @defgroup USBD_CONF_Exported_Types
  126.   * @{
  127.   */
  128. /**
  129.   * @}
  130.   */
  131.  
  132.  
  133. /** @defgroup USBD_CONF_Exported_Macros
  134.   * @{
  135.   */
  136. /**
  137.   * @}
  138.   */
  139.  
  140. /** @defgroup USBD_CONF_Exported_Variables
  141.   * @{
  142.   */
  143. /**
  144.   * @}
  145.   */
  146.  
  147. /** @defgroup USBD_CONF_Exported_FunctionsPrototype
  148.   * @{
  149.   */
  150. /**
  151.   * @}
  152.   */
  153.  
  154. #ifdef __cplusplus
  155. }
  156. #endif
  157.  
  158. #endif /* __USBD_CONF_TEMPLATE_H */
  159.  
  160.  
  161. /**
  162.   * @}
  163.   */
  164.  
  165. /**
  166.   * @}
  167.   */
  168. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  169.  
  170.