snickerdoodle Platform Controller
firmware for STM32F0 platform controller
usbd_conf.h
Go to the documentation of this file.
1 
33 /* Define to prevent recursive inclusion -------------------------------------*/
34 #ifndef __USBD_CONF__H__
35 #define __USBD_CONF__H__
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 /* Includes ------------------------------------------------------------------*/
40 #include <stdio.h>
41 #include <stdlib.h>
42 #include <string.h>
43 #include "stm32f0xx.h"
44 #include "stm32f0xx_hal.h"
45 #include "usbd_def.h"
46 
60 /*---------- -----------*/
61 #define USBD_MAX_NUM_INTERFACES 1
62 /*---------- -----------*/
63 #define USBD_MAX_NUM_CONFIGURATION 1
64 /*---------- -----------*/
65 #define USBD_MAX_STR_DESC_SIZ 512
66 /*---------- -----------*/
67 #define USBD_SUPPORT_USER_STRING 0
68 /*---------- -----------*/
69 #define USBD_DEBUG_LEVEL 0
70 /*---------- -----------*/
71 #define USBD_SELF_POWERED 1
72 /*---------- -----------*/
73 #define USBD_CDC_INTERVAL 1000
74 /*---------- -----------*/
75 #define MAX_STATIC_ALLOC_SIZE 512
76 /****************************************/
77 /* #define for FS and HS identification */
78 #define DEVICE_FS 0
79 
84 /* Memory management macros */
85 #define USBD_malloc (uint32_t *)USBD_static_malloc
86 #define USBD_free USBD_static_free
87 #define USBD_memset /* Not used */
88 #define USBD_memcpy /* Not used */
89 
90 #define USBD_Delay HAL_Delay
91 
92  /* DEBUG macros */
93 
94 #if (USBD_DEBUG_LEVEL > 0)
95 #define USBD_UsrLog(...) printf(__VA_ARGS__);\
96  printf("\n");
97 #else
98 #define USBD_UsrLog(...)
99 #endif
100 
101 
102 #if (USBD_DEBUG_LEVEL > 1)
103 
104 #define USBD_ErrLog(...) printf("ERROR: ") ;\
105  printf(__VA_ARGS__);\
106  printf("\n");
107 #else
108 #define USBD_ErrLog(...)
109 #endif
110 
111 
112 #if (USBD_DEBUG_LEVEL > 2)
113 #define USBD_DbgLog(...) printf("DEBUG : ") ;\
114  printf(__VA_ARGS__);\
115  printf("\n");
116 #else
117 #define USBD_DbgLog(...)
118 #endif
119 
157 /* Exported functions ------------------------------------------------------- */
158 void *USBD_static_malloc(uint32_t size);
159 void USBD_static_free(void *p);
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif //__USBD_CONF__H__
165 
173 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
174 
uint32_t size
Definition: sd_buffer.h:94
void USBD_static_free(void *p)
Dummy memory free.
Definition: usbd_conf.c:494
void * USBD_static_malloc(uint32_t size)
static single allocation.
Definition: usbd_conf.c:483