MCPcopy Create free account
hub / github.com/SmingHub/Sming / init

Function init

samples/Basic_WebSkeletonApp_LTS/app/application.cpp:10–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8void STAGotIP(IpAddress ip, IpAddress mask, IpAddress gateway);
9
10void init()
11{
12 spiffs_mount(); // Mount file system, in order to work with files
13 Serial.begin(SERIAL_BAUD_RATE); // 115200 by default
14 Serial.systemDebugOutput(false);
15
16 // Set higher CPU freq & disable wifi sleep
17 System.setCpuFrequency(CpuCycleClockFast::cpuFrequency());
18 wifi_set_sleep_type(NONE_SLEEP_T);
19
20 ActiveConfig = loadConfig();
21
22 // Attach Wifi events handlers
23 WifiEvents.onStationDisconnect(STADisconnect);
24 WifiEvents.onStationGotIP(STAGotIP);
25
26 System.onReady(startWebServer);
27
28 counterTimer.initializeMs<1000>(counterLoop).start();
29}
30
31void counterLoop()
32{

Callers

nothing calls this directly

Calls 10

spiffs_mountFunction · 0.85
systemDebugOutputMethod · 0.80
setCpuFrequencyMethod · 0.80
onStationDisconnectMethod · 0.80
onStationGotIPMethod · 0.80
onReadyMethod · 0.80
loadConfigFunction · 0.70
wifi_set_sleep_typeFunction · 0.50
beginMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected