@@ -30,23 +30,6 @@ int CEthernet::begin(unsigned long timeout, unsigned long responseTimeout) {
30
30
return 0 ;
31
31
}
32
32
33
- /* -------------------------------------------------------------------------- */
34
- int CEthernet::configureStaticIP (const IPAddress& local_ip, const IPAddress& dns_server, const IPAddress& gateway, const IPAddress& subnet) {
35
- /* -------------------------------------------------------------------------- */
36
- initializeTimer ();
37
-
38
- if (ni) {
39
- ni->config (local_ip, gateway, subnet);
40
- } else {
41
- ni = CLwipIf::getInstance ().get (NI_ETHERNET, local_ip, gateway, subnet);
42
- if (!ni) return 0 ;
43
- }
44
-
45
- ni->DhcpNotUsed ();
46
- CLwipIf::getInstance ().addDns (dns_server);
47
- return 1 ;
48
- }
49
-
50
33
/* -------------------------------------------------------------------------- */
51
34
int CEthernet::begin (const IPAddress& local_ip) {
52
35
/* -------------------------------------------------------------------------- */
@@ -205,4 +188,21 @@ IPAddress CEthernet::dnsServerIP() const {
205
188
return CLwipIf::getInstance ().getDns ();
206
189
}
207
190
191
+ /* -------------------------------------------------------------------------- */
192
+ int CEthernet::configureStaticIP (const IPAddress& local_ip, const IPAddress& dns_server, const IPAddress& gateway, const IPAddress& subnet) {
193
+ /* -------------------------------------------------------------------------- */
194
+ initializeTimer ();
195
+
196
+ if (ni) {
197
+ ni->config (local_ip, gateway, subnet);
198
+ } else {
199
+ ni = CLwipIf::getInstance ().get (NI_ETHERNET, local_ip, gateway, subnet);
200
+ if (!ni) return 0 ;
201
+ }
202
+
203
+ ni->DhcpNotUsed ();
204
+ CLwipIf::getInstance ().addDns (dns_server);
205
+ return 1 ;
206
+ }
207
+
208
208
CEthernet Ethernet;
0 commit comments