Skip to main content
edited title
Link
Juraj
  • 18.3k
  • 4
  • 32
  • 50

How to store a stuct on flashstruct in a file?

Source Link
guyd
  • 1k
  • 2
  • 26
  • 62

How to store a stuct on flash

I'm trying to store (read&write( a struct using LittleFS on ESP8266.

Appreciate assistance

struct oper_string
{
  bool state;     /* On or Off */
  uint8_t step;   /* Step, in case of PWM */
  uint8_t reason; /* What triggered the button */
  time_t ontime;  /* Start Clk */
  time_t offtime; /* Off Clk */
};