Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
System

Access to the ESP8266 system. More...

Functions

void SystemClass::initialize ()
 System initialisation.
 
bool SystemClass::isReady ()
 Check if system ready. More...
 
void SystemClass::restart ()
 Restart system.
 
void SystemClass::setCpuFrequency (CpuFrequency freq)
 Set the CPU frequency. More...
 
CpuFrequency SystemClass::getCpuFrequency ()
 Get the CPU frequency. More...
 
bool SystemClass::deepSleep (uint32 timeMilliseconds, DeepSleepOptions options=eDSO_RF_CAL_BY_INIT_DATA)
 Enter deep sleep mode. More...
 
void SystemClass::onReady (SystemReadyDelegate readyHandler)
 Set handler for system ready event. More...
 
void SystemClass::onReady (ISystemReadyHandler *readyHandler)
 Set handler for system ready event. More...
 
void SystemClass::applyFirmwareUpdate (uint32_t readFlashOffset, uint32_t targetFlashOffset, int firmwareSize)
 Apply a firmware update. More...
 

Detailed Description

Access to the ESP8266 system.

System class.

Note
Provides system control and monitoring of the ESP8266.

Function Documentation

void SystemClass::applyFirmwareUpdate ( uint32_t  readFlashOffset,
uint32_t  targetFlashOffset,
int  firmwareSize 
)

Apply a firmware update.

Parameters
readFlashOffsetAddress of the firmware to use for update
targetFlashOffsetAddress to write firmware to
firmwareSizeQuantity of bytes to write
bool SystemClass::deepSleep ( uint32  timeMilliseconds,
DeepSleepOptions  options = eDSO_RF_CAL_BY_INIT_DATA 
)

Enter deep sleep mode.

Parameters
timeMillisecondsQuantity of milliseconds to remain in deep sleep mode
optionsDeep sleep options
CpuFrequency SystemClass::getCpuFrequency ( )

Get the CPU frequency.

Return values
CpuFrequencyThe frequency of the CPU
bool SystemClass::isReady ( )

Check if system ready.

Return values
boolTrue if system initialisation is complete and system is now ready
void SystemClass::onReady ( SystemReadyDelegate  readyHandler)

Set handler for system ready event.

Parameters
readyHandlerFunction to handle event
void SystemClass::onReady ( ISystemReadyHandler readyHandler)

Set handler for system ready event.

Parameters
readyHandlerFunction to handle event
void SystemClass::setCpuFrequency ( CpuFrequency  freq)

Set the CPU frequency.

Parameters
freqFrequency to set CPU