Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefinition of the F() macro #4

Open
cpm64 opened this issue Apr 28, 2023 · 2 comments
Open

Redefinition of the F() macro #4

cpm64 opened this issue Apr 28, 2023 · 2 comments

Comments

@cpm64
Copy link

cpm64 commented Apr 28, 2023

Hi there,

I would like to know what is the reason of redefining the F() and __FlashStringHelper macros in DIO2.h (non AVR branch)?

In some cases this will break the compilation:

myFunc(const __FlashStringHelper*, ...)

Cheers
CPM

@Trusty77
Copy link
Member

Hi,
You are right, this is probably a legacy of old Arduino non AVR platforms I have used at that time. Probably not necessary anymore. Does it work if you remove the lines in your case ?

@cpm64
Copy link
Author

cpm64 commented Apr 28, 2023

Hi,
Yep, working on both ESP32 and 8266, just removed the 'offending' lines:


#ifdef F
#undef F
#endif

#define F(str)	str
#define __FlashStringHelper		char

Removed #include <Arduino.h> as well, however in my case I include this in another header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants