mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-22 09:37:00 +08:00
feat(esp8266): add system version
Bootloader can get the version of application for specific section, and then check if some features are supported. Developers can use the macro "ESP_IDF_VERSION" to limite some function like following: include "esp_idf_version.h" if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 4, 0) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 0, 0) // 3.4 <= ver < 4.0 do_xxx_process(); endif
This commit is contained in:
@ -33,6 +33,11 @@ static const char* TAG = "system_api";
|
||||
|
||||
static uint8_t base_mac_addr[6] = { 0 };
|
||||
|
||||
// Bootloader can get this information
|
||||
const __attribute__((section(".SystemInfoVector.text"))) esp_sys_info_t g_esp_sys_info = {
|
||||
.version = ESP_IDF_VERSION
|
||||
};
|
||||
|
||||
esp_err_t esp_base_mac_addr_set(uint8_t *mac)
|
||||
{
|
||||
if (mac == NULL) {
|
||||
|
Reference in New Issue
Block a user