mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-25 20:02:37 +03:00
parent
a5662ff0a9
commit
4cc06c2100
@ -141,6 +141,16 @@ void ESP8266WiFiClass::softAP(const char* ssid, const char* passphrase, int chan
|
|||||||
ETS_UART_INTR_ENABLE();
|
ETS_UART_INTR_ENABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ESP8266WiFiClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet)
|
||||||
|
{
|
||||||
|
struct ip_info info;
|
||||||
|
info.ip.addr = static_cast<uint32_t>(local_ip);
|
||||||
|
info.gw.addr = static_cast<uint32_t>(gateway);
|
||||||
|
info.netmask.addr = static_cast<uint32_t>(subnet);
|
||||||
|
wifi_softap_dhcps_stop();
|
||||||
|
wifi_set_ip_info(SOFTAP_IF, &info);
|
||||||
|
wifi_softap_dhcps_start();
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t* ESP8266WiFiClass::macAddress(uint8_t* mac)
|
uint8_t* ESP8266WiFiClass::macAddress(uint8_t* mac)
|
||||||
{
|
{
|
||||||
|
@ -82,6 +82,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
void config(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
|
void config(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
|
||||||
|
|
||||||
|
/* Configure access point
|
||||||
|
*
|
||||||
|
* param local_ip: access point IP
|
||||||
|
* param gateway: gateway IP
|
||||||
|
* param subnet: subnet mask
|
||||||
|
*/
|
||||||
|
void softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disconnect from the network
|
* Disconnect from the network
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user