mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-27 21:16:50 +03:00
* provide full version descriptor, displayed in debug mode * unix: shows core version like under windows when git is unavailable * store strings in progmem * version string honours NDEBUG * add ARDUINO_ESP8266_GIT_DESC restore ARDUINO_ESP8266_GIT_VER restore global variable "core_version" don't print full version on setDebugOutput(true) set platform.txt version to 2.4.1-pre hide irrelevant boot version fix typo * lwip2: fix disconnection/reconnection issue also: improve version string remove useless message * lwip2: bump tag before 2.4.1 * lwip2: improve netif flags management on git side * full-version string: remove useless NDEBUG in separate source file * do not automatically enable sdk messages along with core messages * automatically reenable sdk messages along with core messages *before* setup not after * check serial port when showing version-string + move sdk messages enabler in hardware serial * + license header * updated and tested windows commands in platform.txt (without git) * updated and tested windows commands in platform.txt (without git) * update package builder accordingly
55 lines
1.9 KiB
C++
55 lines
1.9 KiB
C++
/*
|
|
Esp.cpp - ESP8266-specific APIs
|
|
Copyright (c) 2015 Ivan Grokhotkov. All rights reserved.
|
|
This file is part of the esp8266 core for Arduino environment.
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include <Arduino.h>
|
|
#include <user_interface.h>
|
|
#include <core_version.h>
|
|
#include <lwip/init.h> // LWIP_VERSION_*
|
|
#include <lwipopts.h> // LWIP_HASH_STR (lwip2)
|
|
|
|
#define STRHELPER(x) #x
|
|
#define STR(x) STRHELPER(x) // stringifier
|
|
|
|
static const char arduino_esp8266_git_ver [] PROGMEM = STR(ARDUINO_ESP8266_GIT_DESC);
|
|
#if LWIP_VERSION_MAJOR != 1
|
|
static const char lwip2_version [] PROGMEM = "/lwIP:" STR(LWIP_VERSION_MAJOR) "." STR(LWIP_VERSION_MINOR) "." STR(LWIP_VERSION_REVISION);
|
|
#endif
|
|
|
|
String EspClass::getFullVersion()
|
|
{
|
|
return String(F("SDK:")) + system_get_sdk_version()
|
|
+ F("/Core:") + FPSTR(arduino_esp8266_git_ver)
|
|
#if LWIP_VERSION_MAJOR == 1
|
|
+ F("/lwIP:") + String(LWIP_VERSION_MAJOR) + "." + String(LWIP_VERSION_MINOR) + "." + String(LWIP_VERSION_REVISION)
|
|
#else
|
|
+ FPSTR(lwip2_version)
|
|
#endif
|
|
#if LWIP_VERSION_IS_DEVELOPMENT
|
|
+ F("-dev")
|
|
#endif
|
|
#if LWIP_VERSION_IS_RC
|
|
+ F("rc") + String(LWIP_VERSION_RC)
|
|
#endif
|
|
#ifdef LWIP_HASH_STR
|
|
+ "(" + F(LWIP_HASH_STR) + ")"
|
|
#endif
|
|
;
|
|
}
|