|
40 | 40 | #include <stdlib.h>
|
41 | 41 | #include <string.h>
|
42 | 42 |
|
| 43 | +#ifndef USBD_MAX_NUM_INTERFACES |
43 | 44 | #define USBD_MAX_NUM_INTERFACES 2U
|
44 |
| -#define USBD_MAX_NUM_CONFIGURATION 1U |
| 45 | +#endif /* USBD_MAX_NUM_INTERFACES */ |
| 46 | + |
| 47 | +#ifndef USBD_MAX_STR_DESC_SIZ |
45 | 48 | #define USBD_MAX_STR_DESC_SIZ 0x100U
|
46 |
| -#define USBD_SUPPORT_USER_STRING 0U |
47 |
| -#define USBD_SELF_POWERED 1U |
| 49 | +#endif /* USBD_MAX_STR_DESC_SIZ */ |
| 50 | + |
| 51 | +#ifndef USBD_DEBUG_LEVEL |
48 | 52 | #define USBD_DEBUG_LEVEL 0U
|
| 53 | +#endif /* USBD_DEBUG_LEVEL */ |
49 | 54 |
|
50 | 55 | /* MSC Class Config */
|
| 56 | +#ifndef MSC_MEDIA_PACKET |
51 | 57 | #define MSC_MEDIA_PACKET 8192U
|
| 58 | +#endif /* MSC_MEDIA_PACKET */ |
52 | 59 |
|
53 | 60 | /* CDC Class Config */
|
| 61 | +#ifndef USBD_CDC_INTERVAL |
54 | 62 | #define USBD_CDC_INTERVAL 2000U
|
| 63 | +#endif /* USBD_CDC_INTERVAL */ |
55 | 64 |
|
56 | 65 | /* DFU Class Config */
|
| 66 | +#ifndef USBD_DFU_MAX_ITF_NUM |
57 | 67 | #define USBD_DFU_MAX_ITF_NUM 1U
|
| 68 | +#endif /* USBD_DFU_MAX_ITF_NUM */ |
| 69 | +#ifndef USBD_DFU_XFERS_IZE |
58 | 70 | #define USBD_DFU_XFERS_IZE 1024U
|
| 71 | +#endif /* USBD_DFU_XFERS_IZE */ |
59 | 72 |
|
60 | 73 | /* AUDIO Class Config */
|
| 74 | +#ifndef USBD_AUDIO_FREQ |
61 | 75 | #define USBD_AUDIO_FREQ 22100U
|
| 76 | +#endif /* USBD_AUDIO_FREQ */ |
62 | 77 |
|
63 | 78 | /* Memory management macros */
|
| 79 | +#ifndef USBD_malloc |
64 | 80 | #define USBD_malloc malloc
|
| 81 | +#endif /* USBD_malloc */ |
| 82 | +#ifndef USBD_free |
65 | 83 | #define USBD_free free
|
| 84 | +#endif /* USBD_free */ |
| 85 | +#ifndef USBD_memset |
66 | 86 | #define USBD_memset memset
|
| 87 | +#endif /* USBD_memset */ |
| 88 | +#ifndef USBD_memcpy |
67 | 89 | #define USBD_memcpy memcpy
|
| 90 | +#endif /* USBD_memcpy */ |
68 | 91 |
|
69 | 92 | /* DEBUG macros */
|
70 | 93 | #if (USBD_DEBUG_LEVEL > 0U)
|
|
0 commit comments