Files
espurna/code/espurna/netbios.cpp
Maxim Prokhorov 78cd6556f0 system: build time constants and settings
get rid of board module, replace with system calls for hostname, board
and password. move boot (quirks) handlers to system as well
espurna::build { ... } namespace for our app const values
2022-09-21 04:21:23 +03:00

26 lines
528 B
C++

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