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:
commit
82bb82a931
@ -74,6 +74,11 @@ void ESP8266WiFiClass::mode(WiFiMode m)
|
|||||||
ETS_UART_INTR_ENABLE();
|
ETS_UART_INTR_ENABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WiFiMode ESP8266WiFiClass::getMode()
|
||||||
|
{
|
||||||
|
return (WiFiMode)wifi_get_opmode();
|
||||||
|
}
|
||||||
|
|
||||||
void ESP8266WiFiClass::_mode(WiFiMode m)
|
void ESP8266WiFiClass::_mode(WiFiMode m)
|
||||||
{
|
{
|
||||||
if(wifi_get_opmode() == (uint8)m) {
|
if(wifi_get_opmode() == (uint8)m) {
|
||||||
|
@ -44,6 +44,7 @@ public:
|
|||||||
ESP8266WiFiClass();
|
ESP8266WiFiClass();
|
||||||
|
|
||||||
void mode(WiFiMode);
|
void mode(WiFiMode);
|
||||||
|
WiFiMode getMode();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start Wifi connection
|
* Start Wifi connection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user