Skip to content

Commit 9f4eda5

Browse files
committed
stm32/usbd_conf.h: Remove unused macros and clean up header file.
1 parent 9630376 commit 9f4eda5

2 files changed

Lines changed: 0 additions & 45 deletions

File tree

ports/stm32/usbd_conf.h

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -29,63 +29,20 @@
2929
******************************************************************************
3030
*/
3131

32-
/* Define to prevent recursive inclusion -------------------------------------*/
3332
#ifndef __USBD_CONF_H
3433
#define __USBD_CONF_H
3534

36-
/* Includes ------------------------------------------------------------------*/
3735
#include <stdint.h>
3836
#include <stdio.h>
3937
#include <stdlib.h>
4038
#include <string.h>
4139

42-
/* Exported types ------------------------------------------------------------*/
43-
/* Exported constants --------------------------------------------------------*/
44-
/* Common Config */
4540
#define USBD_MAX_NUM_INTERFACES 1
4641
#define USBD_MAX_NUM_CONFIGURATION 1
4742
#define USBD_MAX_STR_DESC_SIZ 0x100
4843
#define USBD_SELF_POWERED 0
4944
#define USBD_DEBUG_LEVEL 0
5045

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-
8946
#endif /* __USBD_CONF_H */
9047

9148
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

ports/stm32/usbdev/core/src/usbd_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *
9999
/* Check whether the USB Host handle is valid */
100100
if(pdev == NULL)
101101
{
102-
USBD_ErrLog("Invalid Device handle");
103102
return USBD_FAIL;
104103
}
105104

@@ -166,7 +165,6 @@ USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, const USBD_Clas
166165
}
167166
else
168167
{
169-
USBD_ErrLog("Invalid Class handle");
170168
status = USBD_FAIL;
171169
}
172170

0 commit comments

Comments
 (0)