Fixes implementation of __FlashStringHelper (#183)

Previous __FlashStringHelper implementation was defines as a char which brought problem in case the method with char* parameter used overloading with __FlashStringHelper* parameter (they was identical). Now __FlashStringHelper is defined as a class and all casts between char* and __FlashStringHelper* are made with reinterpret_cast sugar.
This commit is contained in:
Martin Sloup
2017-02-08 18:57:26 +01:00
committed by Me No Dev
parent cea41d965a
commit 67128fcb2c
5 changed files with 35 additions and 59 deletions

View File

@ -29,8 +29,6 @@ typedef unsigned short prog_uint16_t;
typedef long prog_int32_t;
typedef unsigned long prog_uint32_t;
typedef char __FlashStringHelper;
#define SIZE_IRRELEVANT 0x7fffffff
#define PROGMEM
@ -38,7 +36,6 @@ typedef char __FlashStringHelper;
#define PGM_VOID_P const void *
#define FPSTR(p) ((const char *)(p))
#define PSTR(s) (s)
#define F(s) (s)
#define _SFR_BYTE(n) (n)
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))