Wirepas SDK
shared_shutdown.h File Reference

Go to the source code of this file.

Functions

app_res_e Shared_Shutdown_init (void)
 Initialize the shared Shutdown library. More...
 
app_res_e Shared_Shutdown_addShutDownCb (app_lib_system_shutdown_cb_f callback, uint16_t *cb_id)
 Add a new callback about shutdown cb. More...
 
app_res_e Shared_Shutdown_removeShutDownCb (uint16_t cb_id)
 Remove a shutdown cb item from the list. Removed item fields are all set to 0. More...
 

Function Documentation

◆ Shared_Shutdown_addShutDownCb()

app_res_e Shared_Shutdown_addShutDownCb ( app_lib_system_shutdown_cb_f  callback,
uint16_t *  cb_id 
)

Add a new callback about shutdown cb.

Parameters
callbackNew callback
cb_idId to be used with Shared_Shutdown_removeShutDownCb. Set only if return code is APP_RES_OK.
Returns
APP_RES_OK if ok. See app_res_e for other result codes.

◆ Shared_Shutdown_init()

app_res_e Shared_Shutdown_init ( void  )

Initialize the shared Shutdown library.

Note
If shared shutdown library is used in application, the lib_system->setShutdownCb(), function offered by system library MUST NOT be used outside of this module.
Returns
APP_RES_OK.
Examples
positioning_app/app.c.

◆ Shared_Shutdown_removeShutDownCb()

app_res_e Shared_Shutdown_removeShutDownCb ( uint16_t  cb_id)

Remove a shutdown cb item from the list. Removed item fields are all set to 0.

Parameters
cb_iditem to remove.