1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-27 21:16:50 +03:00

Merge pull request #794 from paulmand3l/esp8266

Adding getMode() function to WiFi library so I can easily get the current mode of the wifi.
This commit is contained in:
Ivan Grokhotkov 2015-09-18 09:54:40 +03:00
commit 82bb82a931
2 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,11 @@ void ESP8266WiFiClass::mode(WiFiMode m)
ETS_UART_INTR_ENABLE();
}
WiFiMode ESP8266WiFiClass::getMode()
{
return (WiFiMode)wifi_get_opmode();
}
void ESP8266WiFiClass::_mode(WiFiMode m)
{
if(wifi_get_opmode() == (uint8)m) {

View File

@ -44,6 +44,7 @@ public:
ESP8266WiFiClass();
void mode(WiFiMode);
WiFiMode getMode();
/**
* Start Wifi connection