|
29 | 29 | ****************************************************************************** |
30 | 30 | */ |
31 | 31 |
|
32 | | -/* Define to prevent recursive inclusion -------------------------------------*/ |
33 | 32 | #ifndef __USBD_CONF_H |
34 | 33 | #define __USBD_CONF_H |
35 | 34 |
|
36 | | -/* Includes ------------------------------------------------------------------*/ |
37 | 35 | #include <stdint.h> |
38 | 36 | #include <stdio.h> |
39 | 37 | #include <stdlib.h> |
40 | 38 | #include <string.h> |
41 | 39 |
|
42 | | -/* Exported types ------------------------------------------------------------*/ |
43 | | -/* Exported constants --------------------------------------------------------*/ |
44 | | -/* Common Config */ |
45 | 40 | #define USBD_MAX_NUM_INTERFACES 1 |
46 | 41 | #define USBD_MAX_NUM_CONFIGURATION 1 |
47 | 42 | #define USBD_MAX_STR_DESC_SIZ 0x100 |
48 | 43 | #define USBD_SELF_POWERED 0 |
49 | 44 | #define USBD_DEBUG_LEVEL 0 |
50 | 45 |
|
51 | | -/* Exported macro ------------------------------------------------------------*/ |
52 | | -/* Memory management macros */ |
53 | | -/* |
54 | | -these should not be used because the GC is reset on a soft reset but the usb is not |
55 | | -#include "gc.h" |
56 | | -#define USBD_malloc gc_alloc |
57 | | -#define USBD_free gc_free |
58 | | -#define USBD_memset memset |
59 | | -#define USBD_memcpy memcpy |
60 | | -*/ |
61 | | - |
62 | | -/* DEBUG macros */ |
63 | | -#if (USBD_DEBUG_LEVEL > 0) |
64 | | -#define USBD_UsrLog(...) printf(__VA_ARGS__);\ |
65 | | - printf("\n"); |
66 | | -#else |
67 | | -#define USBD_UsrLog(...) |
68 | | -#endif |
69 | | - |
70 | | -#if (USBD_DEBUG_LEVEL > 1) |
71 | | - |
72 | | -#define USBD_ErrLog(...) printf("ERROR: ") ;\ |
73 | | - printf(__VA_ARGS__);\ |
74 | | - printf("\n"); |
75 | | -#else |
76 | | -#define USBD_ErrLog(...) |
77 | | -#endif |
78 | | - |
79 | | -#if (USBD_DEBUG_LEVEL > 2) |
80 | | -#define USBD_DbgLog(...) printf("DEBUG : ") ;\ |
81 | | - printf(__VA_ARGS__);\ |
82 | | - printf("\n"); |
83 | | -#else |
84 | | -#define USBD_DbgLog(...) |
85 | | -#endif |
86 | | - |
87 | | -/* Exported functions ------------------------------------------------------- */ |
88 | | - |
89 | 46 | #endif /* __USBD_CONF_H */ |
90 | 47 |
|
91 | 48 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
0 commit comments