瀏覽代碼

Move vsnprintf_P to Marduino.h

Scott Lahteine 6 年之前
父節點
當前提交
cf9ac4c847

+ 0
- 4
Marlin/src/HAL/HAL_DUE/HAL.h 查看文件

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

+ 0
- 4
Marlin/src/HAL/HAL_STM32F1/HAL.h 查看文件

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

+ 0
- 4
Marlin/src/HAL/HAL_STM32F4/HAL.h 查看文件

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

+ 5
- 0
Marlin/src/HAL/shared/Marduino.h 查看文件

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

Loading…
取消
儲存