1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
esp8266/libraries/ESP8266WiFi/src/enable_wifi_at_boot_time.cpp
Earle F. Philhower, III 60fe7b4ca8
Add code-spell spelling checks to CI (#8067)
Help find and fix silly spelling errors as they are added to the repo.
2021-05-23 08:53:04 -07:00

29 lines
790 B
C++

/*
* empty wrappers to play with linker and re-enable wifi at boot time
*/
#include "coredecls.h"
#include <ESP8266WiFi.h>
extern "C" void enableWiFiAtBootTime()
{
/*
* Called by user from anywhere, does nothing and allows overriding
* the core_esp8266_main.cpp's default disableWiFiAtBootTime() by the
* one below, at link time.
*/
}
extern "C" void __disableWiFiAtBootTime()
{
// overrides the default __disableWiFiAtBootTime:
// Does (almost) nothing: WiFi is enabled by default in nonos-sdk
// ... but restores legacy WiFi credentials persistence to true at boot time
// (can be still overrisden by user before setting up WiFi, like before)
// (note: c++ ctors not called yet at this point)
ESP8266WiFiClass::persistent(true);
}