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

Feature Request: Add version macros to esp-idf (IDF-253) #2482

Closed
chrta opened this issue Sep 27, 2018 · 0 comments
Closed

Feature Request: Add version macros to esp-idf (IDF-253) #2482

chrta opened this issue Sep 27, 2018 · 0 comments

Comments

@chrta
Copy link

chrta commented Sep 27, 2018

To be able to write code that works for multiple versions of esp-idf, it is necessary to detect the version during compile time. Something like the following would be good:

/** X.x.x: Major version of the stack */
#define ESP_IDF_VERSION_MAJOR      3
/** x.X.x: Minor version of the stack */
#define ESP_IDF_VERSION_MINOR      0
/** x.x.X: Patch level of the stack */
#define ESP_IDF_VERSION_PATCH      4

For example this is done in lwip:
https://github.com/espressif/esp-lwip/blob/99d992cac3e9d7614ba30ac75f6df35adb59f2e1/src/include/lwip/init.h#L53

@Alvin1Zhang Alvin1Zhang changed the title Feature Request: Add version macros to esp-idf [TW#26570] Feature Request: Add version macros to esp-idf Sep 28, 2018
@projectgus projectgus changed the title [TW#26570] Feature Request: Add version macros to esp-idf Feature Request: Add version macros to esp-idf (IDF-253) Mar 12, 2019
@igrr igrr closed this as completed in 6ca07ec Jun 13, 2019
trombik pushed a commit to trombik/esp-idf that referenced this issue Aug 9, 2019
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

1 participant