AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
|
System library header file. More...
Go to the source code of this file.
Data Structures | |
struct | systemInitConfig_st |
System configuration structure. The application should define the system configuration variable and configure it before calling SYSTEM_init function. More... | |
Typedefs | |
typedef void(* | systemEventCb_t) (systemEvents_et eventId) |
System events callback function type. The application should define the callback function and initialize the system configuration with the callback function to receive the system events. | |
Functions | |
bool | SYSTEM_init (systemInitConfig_st *s_pConfig) |
Initiliaze the system with given configuration. More... | |
bool | SYSTEM_startFirmwareUpdate (firmUpdateType_et e_type, char *pUrlStr) |
Initialize the device for OTA firmware update and put the system into SYSTEM_MODE_OTA mode. More... | |
bool | SYSTEM_startFileDownload (char *pUrlStr) |
Start firmware file download. More... | |
void | SYSTEM_restart (uint32_t restartDelay_u32) |
Restarts device. More... | |
systemMode_et | SYSTEM_getMode () |
Get the system mode. More... | |
const char * | SYSTEM_getModeString () |
Get the system mode as string. More... | |
void | SYSTEM_abort (char *pMsgStr, const char *pFunNameStr, uint32_t errorCode_u32) |
Puts the system in abort mode and restarts the system. More... | |
const char * | SYSTEM_getDeviceName () |
Get the device name as registered in AWS IoT. More... | |
const char * | SYSTEM_getMacAddr () |
Get the MAC address of the device. More... | |
const char * | SYSTEM_getResetCause () |
Get the cause of device reset. More... | |
System library header file.
The system library initialiezes the hardware peripherals required by the system by handling core operations like handling connectivity events for WiFi, BLE, AWS IoT operations, Flash storage operations, printing device logs & OTA firmware updates.
enum systemEvents_et |
An enum that represents System events. The system notifes the application about these events using a callback of type systemEventCb_t.
enum systemMode_et |
An enum that represents System modes. The system will always be in one of the following mode.
void SYSTEM_abort | ( | char * | pMsgStr, |
const char * | pFunNameStr, | ||
uint32_t | errorCode_u32 | ||
) |
Puts the system in abort mode and restarts the system.
[in] | pMsgStr | Error message |
[in] | pFunNameStr | Function that called SYSTEM_abort |
[in] | errorCode_u32 | Error code |
none |
const char * SYSTEM_getDeviceName | ( | ) |
Get the device name as registered in AWS IoT.
none |
const char * SYSTEM_getMacAddr | ( | ) |
Get the MAC address of the device.
none |
systemMode_et SYSTEM_getMode | ( | ) |
Get the system mode.
none |
const char * SYSTEM_getModeString | ( | ) |
Get the system mode as string.
IDLE | string for SYSTEM_MODE_IDLE |
TEST | string for SYSTEM_MODE_TEST |
CONFIG | string for SYSTEM_MODE_CONFIG |
NORMAL | string for SYSTEM_MODE_NORMAL |
OTA | string for SYSTEM_MODE_OTA |
ABORT | string for SYSTEM_MODE_ABORT |
const char * SYSTEM_getResetCause | ( | ) |
Get the cause of device reset.
none |
NO_MEAN | write some description here |
POWERON_RESET | write some description here |
SW_RESET | write some description here |
OWDT_RESET | write some description here |
DEEPSLEEP_RESET | write some description here |
SDIO_RESET | write some description here |
TG0WDT_SYS_RESET | write some description here |
TG1WDT_SYS_RESET | write some description here |
RTCWDT_SYS_RESET | write some description here |
INTRUSION_RESET | write some description here |
TGWDT_CPU_RESET | write some description here |
SW_CPU_RESET | write some description here |
EXT_CPU_RESET | write some description here |
RTCWDT_BROWN_OUT_RESET | write some description here |
RTCWDT_RTC_RESET | write some description here |
bool SYSTEM_init | ( | systemInitConfig_st * | s_pConfig | ) |
Initiliaze the system with given configuration.
[in] | s_pConfig | Pointer to system configuration structure. |
true | on success |
false | on failure |
void SYSTEM_restart | ( | uint32_t | restartDelay_u32 | ) |
Restarts device.
[in] | restartDelay_u32 | Delay (ms) after which system should be restarted |
none |
bool SYSTEM_startFileDownload | ( | char * | pUrlStr | ) |
Start firmware file download.
[in] | pUrlStr | URL of file to be downloaded |
true | on success |
false | on failure |
bool SYSTEM_startFirmwareUpdate | ( | firmUpdateType_et | e_type, |
char * | pUrlStr | ||
) |
Initialize the device for OTA firmware update and put the system into SYSTEM_MODE_OTA mode.
[in] | e_type | Firmware update type |
[in] | pUrlStr | URL of firmware binary file |
true | on success |
false | on failure |