mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
only call wifi_set_opmode when really needed
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user