muizenval

Observe mouse traps remotely
Log | Files | Refs

config.ino (301B)


      1 #include "include/config.h"
      2 
      3 FlashStorage(config_flash, configuration);
      4 
      5 configuration config_default{
      6 	true,	 // valid
      7 	"",		 // token
      8 	"",		 // domain,
      9 };
     10 
     11 configuration config;
     12 
     13 void configuration::open() {
     14 	*this = config_flash.read();
     15 }
     16 
     17 void configuration::save() {
     18 	config_flash.write(*this);
     19 }