/* Settings in the last flash sector: slots, learned pads, BPM, generator, root, scale, synth channel and octave, plus the current seed and track on/off (as app.js keeps them). Erasing a sector stalls both cores for tens of milliseconds, so main.c only saves while stopped. */ #ifndef SEEDBOX_STORAGE_H #define SEEDBOX_STORAGE_H #include "app.h" typedef struct { uint8_t used, gen; uint32_t seed; uint32_t salts[2]; } slot_t; void storage_defaults(live_t *L, slot_t *slots); int storage_load(live_t *L, slot_t *slots); /* 1 if a valid record was found */ int storage_save(const live_t *L, const slot_t *slots); #endif