![]() |
Wirepas SDK
|
A small number of bytes is reserved for the application in the same area where the stack firmware stores its own persistent settings (the Settings library, settings.h). The Storage library can be used to read and write this data. Currently, 32 bytes is reserved for the application.
Library services are accessed via lib_storage handle.
Definition in file storage.h.
Go to the source code of this file.
Typedefs | |
| typedef app_res_e(* | app_lib_storage_write_persistent_f) (const void *bytes, size_t num_bytes) |
| Write data to persistent storage. More... | |
| typedef app_res_e(* | app_lib_storage_read_persistent_f) (void *bytes, size_t num_bytes) |
| Read data written to persistent storage. More... | |
| typedef size_t(* | app_lib_storage_get_persistent_max_size_f) (void) |
| Get persistent maximum size. More... | |
Data Structures | |
| struct | app_lib_storage_t |
Macros | |
| #define | APP_LIB_STORAGE_NAME 0x7713d6af |
| Library symbolic name. More... | |
| #define | APP_LIB_STORAGE_VERSION 0x200 |
| Maximum supported library version. More... | |
| typedef size_t(* app_lib_storage_get_persistent_max_size_f) (void) |
| typedef app_res_e(* app_lib_storage_read_persistent_f) (void *bytes, size_t num_bytes) |
Read data written to persistent storage.
| bytes | Pointer to buffer for reading bytes |
| num_bytes | Total number of bytes to read |
| typedef app_res_e(* app_lib_storage_write_persistent_f) (const void *bytes, size_t num_bytes) |
Write data to persistent storage.
Write new data to the persistent area. All old data is erased, even if new data does not extend to the end of the end of the persistent area.
| bytes | Pointer to bytes to write |
| num_bytes | Total number of bytes to write |
| struct app_lib_storage_t |
The function table returned from app_open_library_f
| Data Fields | ||
|---|---|---|
| app_lib_storage_get_persistent_max_size_f | getPersistentMaxSize | |
| app_lib_storage_read_persistent_f | readPersistent | |
| app_lib_storage_write_persistent_f | writePersistent | |
| #define APP_LIB_STORAGE_NAME 0x7713d6af |