Storage

Configuration Options

API Reference

Handling of Flash or EEPROM to store device configuration.

Functions

int thingset_storage_load()

Load data from persistent storage and write to variables in RAM

Returns:

0 for success or negative errno in case of error

int thingset_storage_save()

Save data from RAM into persistent storage

This function must not be called from a ThingSet callback context, as this would result in a deadlock while. Use thingset_storage_save_queued in this case.

Returns:

0 for success or negative errno in case of error

void thingset_storage_save_queued(bool force)

Save data from RAM into persistent storage (via work queue)

Parameters:
  • force – Overwrite data even if loading data at boot failed.