mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Add support for String args to softAP and begin (#5295)
This commit is contained in:
parent
228ad7ed75
commit
dd6333ee8b
@ -185,6 +185,9 @@ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int ch
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ESP8266WiFiAPClass::softAP(const String& ssid, const String& passphrase, int channel, int ssid_hidden, int max_connection) {
|
||||||
|
return softAP(ssid.c_str(), passphrase.c_str(), channel, ssid_hidden, max_connection);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure access point
|
* Configure access point
|
||||||
|
@ -37,6 +37,7 @@ class ESP8266WiFiAPClass {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
|
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
|
||||||
|
bool softAP(const String& ssid,const String& passphrase = emptyString,int channel = 1,int ssid_hidden = 0,int max_connection = 4);
|
||||||
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
|
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
|
||||||
bool softAPdisconnect(bool wifioff = false);
|
bool softAPdisconnect(bool wifioff = false);
|
||||||
|
|
||||||
|
@ -190,6 +190,10 @@ wl_status_t ESP8266WiFiSTAClass::begin(char* ssid, char *passphrase, int32_t cha
|
|||||||
return begin((const char*) ssid, (const char*) passphrase, channel, bssid, connect);
|
return begin((const char*) ssid, (const char*) passphrase, channel, bssid, connect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wl_status_t ESP8266WiFiSTAClass::begin(const String& ssid, const String& passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||||
|
return begin(ssid.c_str(), passphrase.c_str(), channel, bssid, connect);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use to connect to SDK config.
|
* Use to connect to SDK config.
|
||||||
* @return wl_status_t
|
* @return wl_status_t
|
||||||
|
@ -38,6 +38,7 @@ class ESP8266WiFiSTAClass {
|
|||||||
|
|
||||||
wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||||
wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||||
|
wl_status_t begin(const String& ssid, const String& passphrase = emptyString, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||||
wl_status_t begin();
|
wl_status_t begin();
|
||||||
|
|
||||||
//The argument order for ESP is not the same as for Arduino. However, there is compatibility code under the hood
|
//The argument order for ESP is not the same as for Arduino. However, there is compatibility code under the hood
|
||||||
|
Loading…
x
Reference in New Issue
Block a user