From f4d5d151aa2a9201a0844e3081d5428a941d2eef Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Tue, 17 Jan 2017 16:52:42 +0800 Subject: [PATCH] esp32: add get idf version api --- components/esp32/include/esp_system.h | 7 ++++++- components/esp32/system_api.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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; +}