Просмотр исходного кода

Move vsnprintf_P to Marduino.h

Scott Lahteine 4 лет назад
Родитель
Сommit
cf9ac4c847

+ 0
- 4
Marlin/src/HAL/HAL_DUE/HAL.h Просмотреть файл

@@ -68,10 +68,6 @@
68 68
   #define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
69 69
 #endif
70 70
 
71
-#ifndef vsnprintf_P
72
-  #define vsnprintf_P vsnprintf
73
-#endif
74
-
75 71
 // Fix bug in pgm_read_ptr
76 72
 #undef pgm_read_ptr
77 73
 #define pgm_read_ptr(addr) (*((void**)(addr)))

+ 0
- 4
Marlin/src/HAL/HAL_STM32F1/HAL.h Просмотреть файл

@@ -28,10 +28,6 @@
28 28
 
29 29
 #define CPU_32_BIT
30 30
 
31
-#ifndef vsnprintf_P
32
-  #define vsnprintf_P vsnprintf
33
-#endif
34
-
35 31
 #include "../../core/macros.h"
36 32
 #include "../shared/Marduino.h"
37 33
 #include "../shared/math_32bit.h"

+ 0
- 4
Marlin/src/HAL/HAL_STM32F4/HAL.h Просмотреть файл

@@ -24,10 +24,6 @@
24 24
 
25 25
 #define CPU_32_BIT
26 26
 
27
-#ifndef vsnprintf_P
28
-  #define vsnprintf_P vsnprintf
29
-#endif
30
-
31 27
 #include "../shared/Marduino.h"
32 28
 #include "../shared/math_32bit.h"
33 29
 #include "../shared/HAL_SPI.h"

+ 5
- 0
Marlin/src/HAL/shared/Marduino.h Просмотреть файл

@@ -29,6 +29,7 @@
29 29
 #undef M_PI           // Redefined by all
30 30
 #undef _BV            // Redefined by some
31 31
 #undef sq             // Redefined by teensy3/wiring.h
32
+#undef vsnprintf_P    // Defined by avr/pgmspace.h in some platforms
32 33
 
33 34
 #include <Arduino.h>  // NOTE: If included earlier then this line is a NOOP
34 35
 
@@ -41,6 +42,10 @@
41 42
 #undef sq
42 43
 #define sq(x) ((x)*(x))
43 44
 
45
+#ifndef vsnprintf_P
46
+  #define vsnprintf_P vsnprintf
47
+#endif
48
+
44 49
 #ifndef SBI
45 50
   #define SBI(A,B) (A |= (1 << (B)))
46 51
 #endif

Загрузка…
Отмена
Сохранить