1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

🎨 Update F string declarations

This commit is contained in:
Scott Lahteine 2021-09-25 18:22:37 -05:00 committed by Scott Lahteine
parent cb9fafd4f3
commit 23f10563e0
3 changed files with 9 additions and 8 deletions

View File

@ -87,3 +87,10 @@
#endif #endif
#include "progmem.h" #include "progmem.h"
class __FlashStringHelper;
typedef const __FlashStringHelper* FSTR_P;
#ifndef FPSTR
#define FPSTR(S) (reinterpret_cast<FSTR_P>(S))
#endif
#define FTOP(S) (reinterpret_cast<const char*>(S))

View File

@ -38,7 +38,8 @@
#define PSTR(str) (str) #define PSTR(str) (str)
#endif #endif
#ifndef F #ifndef F
#define F(str) (str) class __FlashStringHelper;
#define F(str) (reinterpret_cast<const __FlashStringHelper *>(PSTR(str)))
#endif #endif
#ifndef _SFR_BYTE #ifndef _SFR_BYTE
#define _SFR_BYTE(n) (n) #define _SFR_BYTE(n) (n)

View File

@ -26,13 +26,6 @@
#include "../inc/MarlinConfigPre.h" #include "../inc/MarlinConfigPre.h"
class __FlashStringHelper;
typedef const __FlashStringHelper* FSTR_P;
#ifndef FPSTR
#define FPSTR(S) (reinterpret_cast<FSTR_P>(S))
#endif
#define FTOP(S) (reinterpret_cast<const char*>(S))
// //
// Conditional type assignment magic. For example... // Conditional type assignment magic. For example...
// //