Embedded SDK
Embedded SDK
usbd_conf.h
Go to the documentation of this file.
1 
32 /* Define to prevent recursive inclusion -------------------------------------*/
33 #ifndef __USBD_CONF__H__
34 #define __USBD_CONF__H__
35 #ifdef __cplusplus
36  extern "C" {
37 #endif
38 
39 #pragma clang diagnostic push
40 #pragma clang diagnostic ignored "-Wtypedef-redefinition"
41 
42 /* Includes ------------------------------------------------------------------*/
43 #include <stdio.h>
44 #include <stdlib.h>
45 #include <string.h>
46 #include <stdint.h>
47 
48 #ifndef _BITS_STDINT_INTN_H
49 typedef signed char int8_t;
50 typedef signed short int16_t;
51 #endif
52 #ifndef _BITS_STDINT_UINTN_H
53 typedef unsigned char uint8_t;
54 typedef unsigned short uint16_t;
55 #endif
56 
70 /*---------- -----------*/
71 #define USBD_MAX_NUM_INTERFACES 3
72 /*---------- -----------*/
73 #define USBD_MAX_NUM_CONFIGURATION 1
74 /*---------- -----------*/
75 #define USBD_MAX_STR_DESC_SIZ 512
76 /*---------- -----------*/
77 #define USBD_SUPPORT_USER_STRING 0
78 /*---------- -----------*/
79 #define USBD_DEBUG_LEVEL 0
80 /*---------- -----------*/
81 #define USBD_LPM_ENABLED 1
82 /*---------- -----------*/
83 #define USBD_SELF_POWERED 1
84 
85 /****************************************/
86 /* #define for FS and HS identification */
87 #define DEVICE_FS 0
88 
93 /* Memory management macros */
94 #define USBD_malloc (uint32_t *)USBD_static_malloc
95 #define USBD_free USBD_static_free
96 #define USBD_memset /* Not used */
97 #define USBD_memcpy /* Not used */
98 
99 #define USBD_Delay HAL_Delay
100 
101  /* DEBUG macros */
102 
103 #if (USBD_DEBUG_LEVEL > 0)
104 #define USBD_UsrLog(...) printf(__VA_ARGS__);\
105  printf("\n");
106 #else
107 #define USBD_UsrLog(...)
108 #endif
109 
110 
111 #if (USBD_DEBUG_LEVEL > 1)
112 
113 #define USBD_ErrLog(...) printf("ERROR: ") ;\
114  printf(__VA_ARGS__);\
115  printf("\n");
116 #else
117 #define USBD_ErrLog(...)
118 #endif
119 
120 
121 #if (USBD_DEBUG_LEVEL > 2)
122 #define USBD_DbgLog(...) printf("DEBUG : ") ;\
123  printf(__VA_ARGS__);\
124  printf("\n");
125 #else
126 #define USBD_DbgLog(...)
127 #endif
128 
166 /* Exported functions ------------------------------------------------------- */
167 void *USBD_static_malloc(uint32_t size);
168 void USBD_static_free(void *p);
169 
170 const volatile uint8_t *USBD_GetPinPadOffset(void);
171 
172 void USB_power(unsigned char enabled);
173 
174 #pragma clang diagnostic pop
175 
176 #ifdef __cplusplus
177 }
178 #endif
179 
180 #endif //__USBD_CONF__H__
181 
189 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
190 
void * USBD_static_malloc(uint32_t size)
void USB_power(unsigned char enabled)
Definition: usbd_impl.c:1560
void USBD_static_free(void *p)
const volatile uint8_t * USBD_GetPinPadOffset(void)
signed short int16_t
Definition: usbd_conf.h:50
unsigned short uint16_t
Definition: usbd_conf.h:54
unsigned char uint8_t
Definition: usbd_conf.h:53
signed char int8_t
Definition: usbd_conf.h:49