STSW-STLKT01: Projects/SensorTile/Applications/AudioLoop/Inc/usbd_conf.h Source File

STSW-STLKT01

usbd_conf.h
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USBD_CONF_H
30 #define __USBD_CONF_H
31 
32 /* Includes ------------------------------------------------------------------*/
33 #include "stm32l4xx_hal.h"
34 
35 
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <string.h>
39 
40 extern PCD_HandleTypeDef hpcd;
41 /* Exported types ------------------------------------------------------------*/
42 /* Exported constants --------------------------------------------------------*/
43 /* Common Config */
44 #define USBD_MAX_NUM_INTERFACES 2
45 #define USBD_MAX_NUM_CONFIGURATION 1
46 #define USBD_MAX_STR_DESC_SIZ 200
47 #define USBD_SUPPORT_USER_STRING 0
48 #define USBD_SELF_POWERED 1
49 #define USBD_DEBUG_LEVEL 0
50 
51 /* AUDIO Class Config */
52 #define USBD_AUDIO_FREQ 48000
53 #define AUDIO_TOTAL_IF_NUM 0x02
54 
55 /* Exported macro ------------------------------------------------------------*/
56 /* Memory management macros */
57 
58 
59 #define USBD_memset memset
60 #define USBD_memcpy memcpy
61 
62 #ifdef USE_STATIC_ALLOCATION
63 
64 #define USBD_free USBD_static_free
65 #define USBD_malloc USBD_static_malloc
66 #define MAX_STATIC_ALLOC_SIZE 1600/4
67 #else
68 #define USBD_free free
69 #define USBD_malloc malloc
70 #define MAX_STATIC_ALLOC_SIZE 4
71 #endif
72 
73 /* DEBUG macros */
74 #if (USBD_DEBUG_LEVEL > 0)
75 #define USBD_UsrLog(...) printf(__VA_ARGS__);\
76  printf("\n");
77 #else
78 #define USBD_UsrLog(...)
79 #endif
80 
81 #if (USBD_DEBUG_LEVEL > 1)
82 
83 #define USBD_ErrLog(...) printf("ERROR: ") ;\
84  printf(__VA_ARGS__);\
85  printf("\n");
86 #else
87 #define USBD_ErrLog(...)
88 #endif
89 
90 #if (USBD_DEBUG_LEVEL > 2)
91 #define USBD_DbgLog(...) printf("DEBUG : ") ;\
92  printf(__VA_ARGS__);\
93  printf("\n");
94 #else
95 #define USBD_DbgLog(...)
96 #endif
97 
98 /* Exported functions ------------------------------------------------------- */
99 
100 #endif /* __USBD_CONF_H */
101 
102 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated by   doxygen 1.8.13