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

Check ESP8285 at runtime #8604

Merged
merged 3 commits into from
Jun 25, 2022
Merged

Check ESP8285 at runtime #8604

merged 3 commits into from
Jun 25, 2022

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Jun 14, 2022

resolves #7340

not really sure about isFlashInterfacePin(x), should there be isFlashInterfacePinEsp8285(x)?
main issue is every variant having #include "../generic/common.h"

@d-a-v
Copy link
Collaborator

d-a-v commented Jun 23, 2022

Should we also change this one or leave it explicitly as statically defined esp8285 ?
In the latter case, should we disable dynamic detection when esp8285 is selected by user ?

@mcspr
Copy link
Collaborator Author

mcspr commented Jun 24, 2022

Should we also change this one or leave it explicitly as statically defined esp8285 ?
In the latter case, should we disable dynamic detection when esp8285 is selected by user ?

Either if we change board= to esp8285, right now it adds -DARDUINO_ESP8266_ESP01 when building with esp8285 as variant. Or, a custom flag inside of the variant header

And yes, there's no point in dynamic detection in the isFlashInterfacePin macro with specific variant.
Plus, only generic variant may add esp_is_8285() call, keeping the rest of variants with the original one.

@d-a-v
Copy link
Collaborator

d-a-v commented Jun 25, 2022

Either if we change board= to esp8285, right now it adds -DARDUINO_ESP8266_ESP01 when building with esp8285 as variant. Or, a custom flag inside of the variant header

Given that esp_is_8285() is always defined, let's not introduce breaking changes by changing macros

@d-a-v d-a-v merged commit 5d4ae86 into esp8266:master Jun 25, 2022
@mcspr mcspr deleted the are-you-esp8285 branch January 7, 2023 00:17
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
* esp_is_8285() at runtime
* less code with less statics, just read again
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

Successfully merging this pull request may close these issues.

Runtime ESP8285 detection and isFlashInterfacePin(x)
2 participants