mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-19 13:54:23 +01:00
updated config() methods in WiFi library
This commit is contained in:
parent
d76468069b
commit
9e7dfb2a06
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -103,14 +103,22 @@ void WiFiClass::config(IPAddress local_ip)
|
||||
WiFiDrv::config(1, (uint32_t)local_ip, 0, 0);
|
||||
}
|
||||
|
||||
void WiFiClass::config(IPAddress local_ip, IPAddress gateway)
|
||||
void WiFiClass::config(IPAddress local_ip, IPAddress dns_server)
|
||||
{
|
||||
WiFiDrv::config(2, (uint32_t)local_ip, (uint32_t)gateway, 0);
|
||||
WiFiDrv::config(1, (uint32_t)local_ip, 0, 0);
|
||||
WiFiDrv::setDNS(1, (uint32_t)dns_server, 0);
|
||||
}
|
||||
|
||||
void WiFiClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet)
|
||||
void WiFiClass::config(IPAddress local_ip, IPAddress dns_server, IPAddress gateway)
|
||||
{
|
||||
WiFiDrv::config(2, (uint32_t)local_ip, (uint32_t)gateway, 0);
|
||||
WiFiDrv::setDNS(1, (uint32_t)dns_server, 0);
|
||||
}
|
||||
|
||||
void WiFiClass::config(IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet)
|
||||
{
|
||||
WiFiDrv::config(3, (uint32_t)local_ip, (uint32_t)gateway, (uint32_t)subnet);
|
||||
WiFiDrv::setDNS(1, (uint32_t)dns_server, 0);
|
||||
}
|
||||
|
||||
void WiFiClass::setDNS(IPAddress dns_server1)
|
||||
|
@ -68,17 +68,26 @@ public:
|
||||
/* Change Ip configuration settings disabling the dhcp client
|
||||
*
|
||||
* param local_ip: Static ip configuration
|
||||
* param gateway : Static gateway configuration
|
||||
* param dns_server: IP configuration for DNS server 1
|
||||
*/
|
||||
void config(IPAddress local_ip, IPAddress gateway);
|
||||
void config(IPAddress local_ip, IPAddress dns_server);
|
||||
|
||||
/* Change Ip configuration settings disabling the dhcp client
|
||||
*
|
||||
* param local_ip: Static ip configuration
|
||||
* param dns_server: IP configuration for DNS server 1
|
||||
* param gateway : Static gateway configuration
|
||||
*/
|
||||
void config(IPAddress local_ip, IPAddress dns_server, IPAddress gateway);
|
||||
|
||||
/* Change Ip configuration settings disabling the dhcp client
|
||||
*
|
||||
* param local_ip: Static ip configuration
|
||||
* param dns_server: IP configuration for DNS server 1
|
||||
* param gateway: Static gateway configuration
|
||||
* param subnet: Static Subnet mask
|
||||
*/
|
||||
void config(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
|
||||
void config(IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet);
|
||||
|
||||
/* Change DNS Ip configuration
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
WiFi Web Server
|
||||
Web Server
|
||||
|
||||
A simple web server that shows the value of the analog input pins.
|
||||
using a WiFi shield.
|
||||
@ -15,9 +15,7 @@
|
||||
by dlf (Metodo2 srl)
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
@ -78,7 +76,7 @@ void loop() {
|
||||
// send a standard http response header
|
||||
client.println("HTTP/1.1 200 OK");
|
||||
client.println("Content-Type: text/html");
|
||||
client.println("Connection: close");
|
||||
client.println("Connnection: close");
|
||||
client.println();
|
||||
client.println("<!DOCTYPE HTML>");
|
||||
client.println("<html>");
|
||||
|
@ -18,6 +18,8 @@ status KEYWORD2
|
||||
connect KEYWORD2
|
||||
write KEYWORD2
|
||||
available KEYWORD2
|
||||
config KEYWORD2
|
||||
setDNS KEYWORD2
|
||||
read KEYWORD2
|
||||
flush KEYWORD2
|
||||
stop KEYWORD2
|
||||
|
Loading…
x
Reference in New Issue
Block a user