Browse Source

🎨 Update F string declarations

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
committed by Scott Lahteine
parent
commit
433a27e475
  1. 7
      Marlin/src/HAL/shared/Marduino.h
  2. 3
      Marlin/src/HAL/shared/progmem.h
  3. 7
      Marlin/src/core/types.h

7
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<FSTR_P>(S))
#endif
#define FTOP(S) (reinterpret_cast<const char*>(S))

3
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<const __FlashStringHelper *>(PSTR(str)))
#endif
#ifndef _SFR_BYTE
#define _SFR_BYTE(n) (n)

7
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<FSTR_P>(S))
#endif
#define FTOP(S) (reinterpret_cast<const char*>(S))
//
// Conditional type assignment magic. For example...
//

Loading…
Cancel
Save