NanoLux (Device) 3.0
Codebase for the open-source AudioLux device.
|
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | Pattern_Data |
struct | Strip_Data |
A structure holding strip configuration data. More... | |
struct | Config_Data |
A structure holding system configuration data. More... | |
Macros | |
#define | NUM_SAVES 3 |
The number of saved strip configs the ESP32 is able to address. | |
#define | PATTERN_LIMIT 4 |
The number of patterns that can run at maximum. | |
Functions | |
void | load_slot (int slot) |
Move patterns in a slot to the main buffer. | |
void | set_slot (int slot) |
Saves the currently-loaded pattern to a save slot. | |
void | save_to_nvs () |
Saves all currently-loaded patterns to NVS. | |
void | clear_all () |
Clears all patterns stored in NVS. | |
void | load_from_nvs () |
Load all patterns from the NVS. | |
void | save_config_to_nvs () |
Saves configuration data to the NVS. | |
void | verify_saves () |
Ensures that saved settings have reasonable data. | |
This file contains function headers for storage.cpp along with data structures for user data stored in NVS.
void clear_all | ( | ) |
Clears all patterns stored in NVS.
This function also clears all patterns saved in volatile storage as well.
void load_from_nvs | ( | ) |
Load all patterns from the NVS.
Ensures all loaded data is properly bounded.
void load_slot | ( | int | slot | ) |
Move patterns in a slot to the main buffer.
slot | The save slot number to load from. |
void save_config_to_nvs | ( | ) |
Saves configuration data to the NVS.
Bounds currently-loaded settings before saving to NVS.
void save_to_nvs | ( | ) |
Saves all currently-loaded patterns to NVS.
This does not save the currently-loaded pattern.
void set_slot | ( | int | slot | ) |
Saves the currently-loaded pattern to a save slot.
slot | The save slot to overwrite. |
void verify_saves | ( | ) |
Ensures that saved settings have reasonable data.
TODO: Is this function even needed anymore?