I need it to compile either way, just not including the new feature if not available.
I see that IDF version 4 added this capability: https://docs.espressif.com/projects/esp ... -version-h
But that check fails to compile on 3.3 and 3.1! So what good is it?
Code: Select all
#include "esp_idf_version.h" #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0) // enable functionality present in IDF v4.0 #endif
I can get IDF_VER macro in (seems generated in makefile) but it is a long string. "v3.3.1-53-gc5e37c707-dirty"
Can I reasonably use that to determine compatibility?