-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
constexpr helpers to identify core version #5269
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
003ec6f
Allowing API changes: add helper defines to identify versions
d-a-v a612946
comments
d-a-v db7d447
Merge branch 'master' into versiondef
d-a-v 949d165
parse version from git-tag at compile time using constexpr
d-a-v 2f8ca21
fix naming, update doc
d-a-v b461c7d
Merge branch 'master' into versiondef
d-a-v 9f3cca9
introduce namespaces
d-a-v 2c4e165
Merge branch 'master' into versiondef
d-a-v 26ca02c
Merge branch 'master' into versiondef
d-a-v 22f81b5
Merge branch 'master' into versiondef
d-a-v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
#ifndef __CORE_ESP8266_VERSION_H | ||
#define __CORE_ESP8266_VERSION_H | ||
|
||
#define CORE_ESP8266_MAJOR (2) | ||
#define CORE_ESP8266_MINOR (4) | ||
#define CORE_ESP8266_REVISION (2) | ||
#define CORE_ESP8266_RC (0) | ||
#define CORE_ESP8266_DEVEL (1) | ||
|
||
#define CORE_ESP8266_VERSION ((CORE_ESP8266_MAJOR*10000) + (CORE_ESP8266_MINOR*1000) + (CORE_ESP8266_REVISION*100) + (CORE_ESP8266_RC*10) + (CORE_ESP8266_DEVEL)) | ||
|
||
// CORE_ESP8266_VERSION: | ||
// 2.4.3-dev (after 2.4.2 release), or 24201 | ||
// 2.5.0-dev (after 2.4.2 release) 24201 | ||
// 2.5.0-rc1 first release candidate 24210 | ||
// 2.5.0-rc1+ dev after first release candidate 24211 | ||
// 2.5.0-rc2 second release candidate 24220 | ||
// 2.5.0 release 25000 | ||
// 2.5.1-dev 25001 | ||
// 2.5.1-rc1 25010 | ||
// 2.5.1 release 25100 | ||
|
||
// for example: | ||
// 24211 should read as: | ||
// "dev after first RC after 2.4.2" (for 2.4.3 or 2.5.0) | ||
// CORE_ESP8266_DEVEL must be increased whenever API changes 24201 -> 24202 -> 24203 | ||
// so one can always compare (#if CORE_ESP8266_VERSION < 24201 // previous api...) | ||
|
||
#endif // __CORE_ESP8266_ESP8266_VERSION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's partial overlap between these and the ones in core_version.h.
Can defines in core_version.h be written using these new ones?