Wirepas SDK
persistent.h File Reference

Go to the source code of this file.

Functions

void Persistent_init (void)
 Initializes the persistent module. Sets autoboot and firstboot flags to their default values. More...
 
app_res_e Persistent_getAutostart (bool *autostart)
 Get autostart bit. More...
 
app_res_e Persistent_setAutostart (bool autostart)
 Set autostart bit. More...
 
app_res_e Persistent_isFirstboot (bool *firstboot)
 Get firstboot flag. More...
 
app_res_e Persistent_setFirstboot (bool firstboot)
 Set firstboot flag. More...
 
app_res_e Persistent_getGroups (multicast_group_addr_t *addr)
 Get multicast groups. More...
 
app_res_e Persistent_setGroups (multicast_group_addr_t *addr)
 Set multicast groups. More...
 

Function Documentation

◆ Persistent_getAutostart()

app_res_e Persistent_getAutostart ( bool *  autostart)

Get autostart bit.

Parameters
autostartout: true: autostart is enabled, false: autostart is disabled
Returns
Status of the operation

◆ Persistent_getGroups()

app_res_e Persistent_getGroups ( multicast_group_addr_t addr)

Get multicast groups.

Parameters
addrMulticast addresses stored in storage
Returns
Status of the operation

◆ Persistent_init()

void Persistent_init ( void  )

Initializes the persistent module. Sets autoboot and firstboot flags to their default values.

◆ Persistent_isFirstboot()

app_res_e Persistent_isFirstboot ( bool *  firstboot)

Get firstboot flag.

Parameters
firstbootout: true: this is the first boot, false: not the first boot
Note
The logic is inversed in the raw persistant storage (firstboot==true means 0 is stored in flash).
Returns
Status of the operation

◆ Persistent_setAutostart()

app_res_e Persistent_setAutostart ( bool  autostart)

Set autostart bit.

Parameters
autostarttrue: autostart is enabled, false: autostart is disabled
Returns
Status of the operation

◆ Persistent_setFirstboot()

app_res_e Persistent_setFirstboot ( bool  firstboot)

Set firstboot flag.

Parameters
firstbootout: true: this is the first boot, false: not the first boot
Returns
Status of the operation

◆ Persistent_setGroups()

app_res_e Persistent_setGroups ( multicast_group_addr_t addr)

Set multicast groups.

Parameters
addrMulticast addresses stored in storage
Returns
Status of the operation