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

Function init

samples/HttpServer_Bootstrap/app/application.cpp:94–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92} // namespace
93
94void init()
95{
96 Serial.begin(SERIAL_BAUD_RATE); // 115200 by default
97 Serial.systemDebugOutput(true); // Enable debug output to serial
98
99 spiffs_mount(); // Mount file system, in order to work with files
100
101 pinMode(LED_PIN, OUTPUT);
102
103 WifiStation.enable(true);
104 WifiStation.config(WIFI_SSID, WIFI_PWD);
105 WifiAccessPoint.enable(false);
106
107 // Run our method when station was connected to AP
108 WifiEvents.onStationGotIP(gotIP);
109
110 // Max. out CPU frequency
111 System.setCpuFrequency(CpuCycleClockFast::cpuFrequency());
112 Serial << _F("New CPU frequency is ") << System.getCpuFrequency() << " MHz" << endl;
113}

Callers

nothing calls this directly

Calls 9

spiffs_mountFunction · 0.85
systemDebugOutputMethod · 0.80
onStationGotIPMethod · 0.80
setCpuFrequencyMethod · 0.80
getCpuFrequencyMethod · 0.80
pinModeFunction · 0.50
beginMethod · 0.45
enableMethod · 0.45
configMethod · 0.45

Tested by

no test coverage detected