Browse Source

Reduce STM32F4 compile warnings

Scott Lahteine 6 years ago
parent
commit
606a4362b3

+ 1
- 0
Marlin/src/HAL/HAL_STM32F4/HAL.h View File

110
   #define NUM_SERIAL 1
110
   #define NUM_SERIAL 1
111
 #endif
111
 #endif
112
 
112
 
113
+#undef _BV
113
 #define _BV(b) (1 << (b))
114
 #define _BV(b) (1 << (b))
114
 
115
 
115
 /**
116
 /**

+ 1
- 0
Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h View File

29
 #ifndef _FASTIO_STM32F4_H
29
 #ifndef _FASTIO_STM32F4_H
30
 #define _FASTIO_STM32F4_H
30
 #define _FASTIO_STM32F4_H
31
 
31
 
32
+#undef _BV
32
 #define _BV(b) (1 << (b))
33
 #define _BV(b) (1 << (b))
33
 
34
 
34
 #define USEABLE_HARDWARE_PWM(p) true
35
 #define USEABLE_HARDWARE_PWM(p) true

+ 1
- 1
Marlin/src/core/macros.h View File

57
 #define NANOSECONDS_PER_CYCLE (1000000000.0 / F_CPU)
57
 #define NANOSECONDS_PER_CYCLE (1000000000.0 / F_CPU)
58
 
58
 
59
 // Remove compiler warning on an unused variable
59
 // Remove compiler warning on an unused variable
60
-#define UNUSED(x) (void) (x)
60
+#define UNUSED(x) ((void)(x))
61
 
61
 
62
 // Macros to make a string from a macro
62
 // Macros to make a string from a macro
63
 #define STRINGIFY_(M) #M
63
 #define STRINGIFY_(M) #M

Loading…
Cancel
Save