diff --git a/components/esp32/include/esp_system.h b/components/esp32/include/esp_system.h index e1f46de80..30701761a 100644 --- a/components/esp32/include/esp_system.h +++ b/components/esp32/include/esp_system.h @@ -124,7 +124,12 @@ esp_err_t system_efuse_read_mac(uint8_t mac[6]) __attribute__ ((deprecated)); */ const char* system_get_sdk_version(void) __attribute__ ((deprecated)); - +/** + * Get IDF version + * + * @return constant string from IDF_VER + */ +const char* esp_get_idf_version(void); #ifdef __cplusplus } diff --git a/components/esp32/system_api.c b/components/esp32/system_api.c index 2f834a9ea..d984af78a 100644 --- a/components/esp32/system_api.c +++ b/components/esp32/system_api.c @@ -179,4 +179,8 @@ const char* system_get_sdk_version(void) return "master"; } +const char* esp_get_idf_version(void) +{ + return IDF_VER; +}