ESP8266
|
Public Member Functions | |
ESP8266WiFiGenericClass () | |
void | onEvent (WiFiEventCb cbEvent, WiFiEvent_t event=WIFI_EVENT_MAX) |
void | removeEvent (WiFiEventCb cbEvent, WiFiEvent_t event=WIFI_EVENT_MAX) |
int32_t | channel (void) |
bool | setSleepMode (WiFiSleepType_t type) |
WiFiSleepType_t | getSleepMode () |
bool | setPhyMode (WiFiPhyMode_t mode) |
WiFiPhyMode_t | getPhyMode () |
void | setOutputPower (float dBm) |
void | persistent (bool persistent) |
bool | mode (WiFiMode_t) |
WiFiMode_t | getMode () |
bool | enableSTA (bool enable) |
bool | enableAP (bool enable) |
bool | forceSleepBegin (uint32 sleepUs=0) |
bool | forceSleepWake () |
int | hostByName (const char *aHostname, IPAddress &aResult) |
Static Protected Member Functions | |
static void | _eventCallback (void *event) |
Static Protected Attributes | |
static bool | _persistent = true |
static WiFiMode_t | _forceSleepLastMode = WIFI_OFF |
ESP8266WiFiGenericClass::ESP8266WiFiGenericClass | ( | ) |
|
staticprotected |
callback for WiFi events
arg |
int32_t ESP8266WiFiGenericClass::channel | ( | void | ) |
Return the current channel associated with the network
bool ESP8266WiFiGenericClass::enableAP | ( | bool | enable | ) |
control AP mode
enable | bool |
bool ESP8266WiFiGenericClass::enableSTA | ( | bool | enable | ) |
control STA mode
enable | bool |
bool ESP8266WiFiGenericClass::forceSleepBegin | ( | uint32 | sleepUs = 0 | ) |
Disable WiFi for x us when value is not 0
sleep_time_in_us |
bool ESP8266WiFiGenericClass::forceSleepWake | ( | ) |
wake up WiFi Modem
WiFiMode_t ESP8266WiFiGenericClass::getMode | ( | ) |
get WiFi mode
WiFiPhyMode_t ESP8266WiFiGenericClass::getPhyMode | ( | ) |
get phy Mode
WiFiSleepType_t ESP8266WiFiGenericClass::getSleepMode | ( | ) |
get Sleep mode
int ESP8266WiFiGenericClass::hostByName | ( | const char * | aHostname, |
IPAddress & | aResult | ||
) |
Resolve the given hostname to an IP address.
aHostname | Name to be resolved |
aResult | IPAddress structure to store the returned IP address |
bool ESP8266WiFiGenericClass::mode | ( | WiFiMode_t | m | ) |
set new mode
m | WiFiMode_t |
void ESP8266WiFiGenericClass::onEvent | ( | WiFiEventCb | cbEvent, |
WiFiEvent_t | event = WIFI_EVENT_MAX |
||
) |
set callback function
cbEvent | WiFiEventCb |
event | optional filter (WIFI_EVENT_MAX is all events) |
void ESP8266WiFiGenericClass::persistent | ( | bool | persistent | ) |
store WiFi config in SDK flash area
persistent |
void ESP8266WiFiGenericClass::removeEvent | ( | WiFiEventCb | cbEvent, |
WiFiEvent_t | event = WIFI_EVENT_MAX |
||
) |
removes a callback form event handler
cbEvent | WiFiEventCb |
event | optional filter (WIFI_EVENT_MAX is all events) |
void ESP8266WiFiGenericClass::setOutputPower | ( | float | dBm | ) |
set the output power of WiFi
dBm | max: +20.5dBm min: 0dBm |
bool ESP8266WiFiGenericClass::setPhyMode | ( | WiFiPhyMode_t | mode | ) |
set phy Mode
mode | phy_mode_t |
bool ESP8266WiFiGenericClass::setSleepMode | ( | WiFiSleepType_t | type | ) |
set Sleep mode
type | sleep_type_t |
|
staticprotected |
|
staticprotected |