File tree Expand file tree Collapse file tree 1 file changed +18
-19
lines changed
libraries/lwIpWrapper/src Expand file tree Collapse file tree 1 file changed +18
-19
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,24 @@ void CNetIf::linkDownCallback() {
385
385
* DHCP related functions
386
386
* ########################################################################## */
387
387
388
+ void CNetIf::config (IPAddress _ip, IPAddress _gw, IPAddress _nm) {
389
+ #ifdef LWIP_DHCP
390
+ dhcpStop ();
391
+ dhcpStart ();
392
+ #endif
393
+
394
+ ip_addr_t ip = fromArduinoIP (_ip);
395
+ ip_addr_t nm = fromArduinoIP (_gw);
396
+ ip_addr_t gw = fromArduinoIP (_nm);
397
+
398
+ netif_set_addr (&ni, &ip, &nm, &gw);
399
+
400
+ if (netif_is_link_up (&ni)) {
401
+ netif_set_down (&ni);
402
+ netif_set_up (&ni);
403
+ }
404
+ }
405
+
388
406
389
407
#ifdef LWIP_DHCP
390
408
@@ -961,25 +979,6 @@ err_t CWifiSoftAp::output(struct netif* _ni, struct pbuf* p) {
961
979
return errval;
962
980
}
963
981
964
- /* -------------------------------------------------------------------------- */
965
- void CNetIf::config (IPAddress _ip, IPAddress _gw, IPAddress _nm)
966
- {
967
- dhcpStop ();
968
- dhcpStart ();
969
-
970
- ip_addr_t ip = fromArduinoIP (_ip);
971
- ip_addr_t nm = fromArduinoIP (_gw);
972
- ip_addr_t gw = fromArduinoIP (_nm);
973
-
974
- netif_set_addr (&ni, &ip, &nm, &gw);
975
-
976
- if (netif_is_link_up (&ni)) {
977
- netif_set_down (&ni);
978
- netif_set_up (&ni);
979
- }
980
- }
981
-
982
-
983
982
void CWifiSoftAp::task () {
984
983
// calling the base class task, in order to make thigs work
985
984
CNetIf::task ();
You can’t perform that action at this time.
0 commit comments