mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
only call wifi_set_opmode when really needed
This commit is contained in:
parent
1de33fe51b
commit
fa4fd9ed9d
@ -45,6 +45,9 @@ ESP8266WiFiClass::ESP8266WiFiClass()
|
||||
|
||||
void ESP8266WiFiClass::mode(WiFiMode m)
|
||||
{
|
||||
if(wifi_get_opmode() == (uint8)m) {
|
||||
return;
|
||||
}
|
||||
ETS_UART_INTR_DISABLE();
|
||||
wifi_set_opmode(m);
|
||||
ETS_UART_INTR_ENABLE();
|
||||
|
Loading…
x
Reference in New Issue
Block a user