From: Wu Jian Gang Date: Tue, 17 Jan 2017 08:52:42 +0000 (+0800) Subject: esp32: add get idf version api X-Git-Tag: v2.0-rc1~24^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4d5d151aa2a9201a0844e3081d5428a941d2eef;p=esp-idf esp32: add get idf version api --- diff --git a/components/esp32/include/esp_system.h b/components/esp32/include/esp_system.h index e1f46de803..30701761ad 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 2f834a9eac..d984af78a7 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; +}