From 433a27e475584e73195a89d59ed5ecc20303d53d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 25 Sep 2021 18:22:37 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Update=20F=20string=20declaratio?= =?UTF-8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/shared/Marduino.h | 7 +++++++ Marlin/src/HAL/shared/progmem.h | 3 ++- Marlin/src/core/types.h | 7 ------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/src/HAL/shared/Marduino.h b/Marlin/src/HAL/shared/Marduino.h index ddc3451fbe..3b5a68a373 100644 --- a/Marlin/src/HAL/shared/Marduino.h +++ b/Marlin/src/HAL/shared/Marduino.h @@ -87,3 +87,10 @@ #endif #include "progmem.h" + +class __FlashStringHelper; +typedef const __FlashStringHelper* FSTR_P; +#ifndef FPSTR + #define FPSTR(S) (reinterpret_cast(S)) +#endif +#define FTOP(S) (reinterpret_cast(S)) diff --git a/Marlin/src/HAL/shared/progmem.h b/Marlin/src/HAL/shared/progmem.h index 539d02705e..a76b379bb8 100644 --- a/Marlin/src/HAL/shared/progmem.h +++ b/Marlin/src/HAL/shared/progmem.h @@ -38,7 +38,8 @@ #define PSTR(str) (str) #endif #ifndef F -#define F(str) (str) +class __FlashStringHelper; +#define F(str) (reinterpret_cast(PSTR(str))) #endif #ifndef _SFR_BYTE #define _SFR_BYTE(n) (n) diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index e11a6cd03e..72099fb408 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -26,13 +26,6 @@ #include "../inc/MarlinConfigPre.h" -class __FlashStringHelper; -typedef const __FlashStringHelper* FSTR_P; -#ifndef FPSTR - #define FPSTR(S) (reinterpret_cast(S)) -#endif -#define FTOP(S) (reinterpret_cast(S)) - // // Conditional type assignment magic. For example... //