Explorar el Código

🎨 Update F string declarations

Scott Lahteine hace 3 años
padre
commit
23f10563e0

+ 7
- 0
Marlin/src/HAL/shared/Marduino.h Ver fichero

@@ -87,3 +87,10 @@
87 87
 #endif
88 88
 
89 89
 #include "progmem.h"
90
+
91
+class __FlashStringHelper;
92
+typedef const __FlashStringHelper* FSTR_P;
93
+#ifndef FPSTR
94
+  #define FPSTR(S) (reinterpret_cast<FSTR_P>(S))
95
+#endif
96
+#define FTOP(S) (reinterpret_cast<const char*>(S))

+ 2
- 1
Marlin/src/HAL/shared/progmem.h Ver fichero

@@ -38,7 +38,8 @@
38 38
 #define PSTR(str) (str)
39 39
 #endif
40 40
 #ifndef F
41
-#define F(str) (str)
41
+class __FlashStringHelper;
42
+#define F(str) (reinterpret_cast<const __FlashStringHelper *>(PSTR(str)))
42 43
 #endif
43 44
 #ifndef _SFR_BYTE
44 45
 #define _SFR_BYTE(n) (n)

+ 0
- 7
Marlin/src/core/types.h Ver fichero

@@ -26,13 +26,6 @@
26 26
 
27 27
 #include "../inc/MarlinConfigPre.h"
28 28
 
29
-class __FlashStringHelper;
30
-typedef const __FlashStringHelper* FSTR_P;
31
-#ifndef FPSTR
32
-  #define FPSTR(S) (reinterpret_cast<FSTR_P>(S))
33
-#endif
34
-#define FTOP(S) (reinterpret_cast<const char*>(S))
35
-
36 29
 //
37 30
 // Conditional type assignment magic. For example...
38 31
 //

Loading…
Cancelar
Guardar