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

Function onReady

samples/Basic_Tasks/app/application.cpp:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void onReady()
79{
80 Serial.print("Calibrating CPU usage...");
81 cpuUsage.begin([]() {
82
83#ifndef DISABLE_WIFI
84 // If you want, you can define WiFi settings globally in Eclipse Environment Variables
85#ifdef WIFI_SSID
86 WifiStation.config(WIFI_SSID, WIFI_PWD);
87#endif
88 WifiStation.enable(true);
89 WifiAccessPoint.enable(false);
90 WifiEvents.onStationGotIP([](IpAddress ip, IpAddress netmask, IpAddress gateway) {
91 Serial << _F("GOTIP - IP: ") << ip << _F(", mask: ") << netmask << _F(", gateway: ") << gateway << endl;
92 });
93
94#endif
95
96 hwtimer.initializeUs<hwTimerInterval>(hwTimerCallback).start();
97 reader.resume();
98 });
99}
100
101} // namespace
102

Callers 1

calibrationLoopMethod · 0.85

Calls 7

onStationGotIPMethod · 0.80
resumeMethod · 0.80
printMethod · 0.45
beginMethod · 0.45
configMethod · 0.45
enableMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected