1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Add softAPbroadcastIP (#8963)

This commit is contained in:
reyfel 2023-07-27 00:52:59 +02:00 committed by GitHub
parent 90c4e3afc1
commit f2da54d3a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -323,6 +323,17 @@ IPAddress ESP8266WiFiAPClass::softAPIP() {
return IPAddress(ip.ip.addr);
}
/**
* Get the softAP broadcast ip address.
* @return IPAddress softAP broadcast IP
*/
IPAddress ESP8266WiFiAPClass::softAPbroadcastIP()
{
struct ip_info ip;
wifi_get_ip_info(SOFTAP_IF, &ip);
return IPAddress(ip.ip.addr | ~(ip.netmask.addr));
}
/**
* Get the softAP interface MAC address.

View File

@ -45,6 +45,7 @@ class ESP8266WiFiAPClass {
uint8_t softAPgetStationNum();
IPAddress softAPIP();
IPAddress softAPbroadcastIP();
uint8_t* softAPmacAddress(uint8_t* mac);
String softAPmacAddress(void);