Subversion Repositories dashGPS

Rev

Rev 16 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /**
  2.   ******************************************************************************
  3.   * @file    usbd_conf_template.h
  4.   * @author  MCD Application Team
  5.   * @brief   Header file for the usbd_conf_template.c file
  6.   ******************************************************************************
  7.   * @attention
  8.   *
  9.   * <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
  10.   * All rights reserved.</center></h2>
  11.   *
  12.   * This software component is licensed by ST under Ultimate Liberty license
  13.   * SLA0044, the "License"; You may not use this file except in compliance with
  14.   * the License. You may obtain a copy of the License at:
  15.   *                      www.st.com/SLA0044
  16.   *
  17.   ******************************************************************************
  18.   */
  19.  
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __USBD_CONF_TEMPLATE_H
  22. #define __USBD_CONF_TEMPLATE_H
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /* Includes ------------------------------------------------------------------*/
  29. #include "stm32fxxx.h"  /* replace 'stm32xxx' with your HAL driver header filename, ex: stm32f4xx.h */
  30. #include <stdio.h>
  31. #include <stdlib.h>
  32. #include <string.h>
  33.  
  34. /** @addtogroup STM32_USB_DEVICE_LIBRARY
  35.   * @{
  36.   */
  37.  
  38. /** @defgroup USBD_CONF
  39.   * @brief USB device low level driver configuration file
  40.   * @{
  41.   */
  42.  
  43. /** @defgroup USBD_CONF_Exported_Defines
  44.   * @{
  45.   */
  46.  
  47. #define USBD_MAX_NUM_INTERFACES               1U
  48. #define USBD_MAX_NUM_CONFIGURATION            1U
  49. #define USBD_MAX_STR_DESC_SIZ                 0x100U
  50. #define USBD_SUPPORT_USER_STRING_DESC         0U
  51. #define USBD_SELF_POWERED                     1U
  52. #define USBD_DEBUG_LEVEL                      2U
  53.  
  54. /* MSC Class Config */
  55. #define MSC_MEDIA_PACKET                       8192U
  56.  
  57. /* CDC Class Config */
  58. #define USBD_CDC_INTERVAL                      2000U
  59.  
  60. /* DFU Class Config */
  61. #define USBD_DFU_MAX_ITF_NUM                   1U
  62. #define USBD_DFU_XFERS_IZE                     1024U
  63.  
  64. /* AUDIO Class Config */
  65. #define USBD_AUDIO_FREQ                       22100U
  66.  
  67. /** @defgroup USBD_Exported_Macros
  68.   * @{
  69.   */
  70.  
  71. /* Memory management macros */
  72. #define USBD_malloc               malloc
  73. #define USBD_free                 free
  74. #define USBD_memset               memset
  75. #define USBD_memcpy               memcpy
  76.  
  77. /* DEBUG macros */
  78. #if (USBD_DEBUG_LEVEL > 0U)
  79. #define  USBD_UsrLog(...)   do { \
  80.                             printf(__VA_ARGS__); \
  81.                             printf("\n"); \
  82. } while (0)
  83. #else
  84. #define USBD_UsrLog(...) do {} while (0)
  85. #endif
  86.  
  87. #if (USBD_DEBUG_LEVEL > 1U)
  88.  
  89. #define  USBD_ErrLog(...) do { \
  90.                             printf("ERROR: ") ; \
  91.                             printf(__VA_ARGS__); \
  92.                             printf("\n"); \
  93. } while (0)
  94. #else
  95. #define USBD_ErrLog(...) do {} while (0)
  96. #endif
  97.  
  98. #if (USBD_DEBUG_LEVEL > 2U)
  99. #define  USBD_DbgLog(...)   do { \
  100.                             printf("DEBUG : ") ; \
  101.                             printf(__VA_ARGS__); \
  102.                             printf("\n"); \
  103. } while (0)
  104. #else
  105. #define USBD_DbgLog(...) do {} while (0)
  106. #endif
  107.  
  108. /**
  109.   * @}
  110.   */
  111.  
  112.  
  113.  
  114. /**
  115.   * @}
  116.   */
  117.  
  118.  
  119. /** @defgroup USBD_CONF_Exported_Types
  120.   * @{
  121.   */
  122. /**
  123.   * @}
  124.   */
  125.  
  126.  
  127. /** @defgroup USBD_CONF_Exported_Macros
  128.   * @{
  129.   */
  130. /**
  131.   * @}
  132.   */
  133.  
  134. /** @defgroup USBD_CONF_Exported_Variables
  135.   * @{
  136.   */
  137. /**
  138.   * @}
  139.   */
  140.  
  141. /** @defgroup USBD_CONF_Exported_FunctionsPrototype
  142.   * @{
  143.   */
  144. /**
  145.   * @}
  146.   */
  147.  
  148. #ifdef __cplusplus
  149. }
  150. #endif
  151.  
  152. #endif /* __USBD_CONF_TEMPLATE_H */
  153.  
  154.  
  155. /**
  156.   * @}
  157.   */
  158.  
  159. /**
  160.   * @}
  161.   */
  162. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  163.