| 92 | } // namespace |
| 93 | |
| 94 | void 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 | } |
nothing calls this directly
no test coverage detected