Convert .ino -> .cpp (#2228)

- general conversion from .ino modules into a separate .cpp files
- clean-up internal headers, place libraries into .h. guard .cpp with _SUPPORT flags 
- fix some instances of shared variables instead of public methods
- tweak build system to still build a single source file via os environment variable ESPURNA_BUILD_SINGLE_SOURCE
This commit is contained in:
Max Prokhorov
2020-04-30 13:55:07 +03:00
committed by GitHub
parent 732e84c45e
commit edb23dbfc4
125 changed files with 2977 additions and 2352 deletions

20
code/espurna/netbios.cpp Normal file
View File

@@ -0,0 +1,20 @@
/*
NETBIOS MODULE
Copyright (C) 2017-2019 by Xose Pérez <xose dot perez at gmail dot com>
*/
#include "netbios.h"
#if NETBIOS_SUPPORT
void netbiosSetup() {
static WiFiEventHandler _netbios_wifi_onSTA = WiFi.onStationModeGotIP([](WiFiEventStationModeGotIP ipInfo) {
NBNS.begin(getSetting("hostname").c_str());
DEBUG_MSG_P(PSTR("[NETBIOS] Configured\n"));
});
}
#endif // NETBIOS_SUPPORT