1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +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
#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)
#endif
#ifndef F
#define F(str) (str)
class __FlashStringHelper;
#define F(str) (reinterpret_cast<const __FlashStringHelper *>(PSTR(str)))
#endif
#ifndef _SFR_BYTE
#define _SFR_BYTE(n) (n)

View File

@ -26,13 +26,6 @@
#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...
//