Skip to content

Commit c2d1bd9

Browse files
committed
Merge remote-tracking branch 'arduino/master' into HEAD
2 parents a9cc5de + dcbe596 commit c2d1bd9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libraries/WiFi/src/WiFi.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ int arduino::WiFiClass::begin(const char* ssid, const char* passphrase) {
3030
return _currentNetworkStatus;
3131
}
3232

33+
//Config Wifi to set Static IP && Disable DHCP
34+
void arduino::WiFiClass::config(const char* localip, const char* netmask, const char* gateway){
35+
wifi_if->set_network(localip, netmask, gateway);
36+
wifi_if->set_dhcp(false);
37+
}
38+
3339
int arduino::WiFiClass::beginAP(const char* ssid, const char* passphrase, uint8_t channel) {
3440

3541
#if defined(COMPONENT_4343W_FS)

libraries/WiFi/src/WiFi.h

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class WiFiClass : public MbedSocketClass {
8585
* must be between ASCII 32-126 (decimal).
8686
*/
8787
int begin(const char* ssid, const char* passphrase);
88+
89+
void config(const char* localip, const char* netmask, const char* gateway);
8890

8991
int beginAP(const char* ssid, const char* passphrase, uint8_t channel = DEFAULT_AP_CHANNEL);
9092

0 commit comments

Comments
 (0)