Skip to content

Commit

Permalink
馃帹 Update F string declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 25, 2021
1 parent 1de265e commit 433a27e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions Marlin/src/HAL/shared/Marduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 1 deletion Marlin/src/HAL/shared/progmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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...
//
Expand Down

0 comments on commit 433a27e

Please sign in to comment.