/* --------------------------------------------------------------- */ #include /* --------------------------------------------------------------- */ short init_storage(void) { short foo; Serial.println(__func__); Serial.print("eeprom length: "); Serial.println(EEPROM.length()); Serial.print("global length: "); Serial.println(sizeof(Global)); } /* --------------------------------------------------------------- */ short read_config(short num, Global *where) { #if DEBUG prtln(">>> read config"); #endif return -1; } /* --------------------------------------------------------------- */ short write_config(short num, Global *from) { #if DEBUG prtln(">>> write config"); #endif from->magic = 0xfde9; memcpy(from->tag, "aaaa", 4); return -1; } /* --------------------------------------------------------------- */ short display_config(Global *what) { char foo, c; #if DEBUG prtln(">>> display config"); #endif prt("Magic : "); prtln(what->magic); prt("Id : "); for (foo=0; foo<4; foo++) { if (isprint(c=what->tag[foo])) prt(c); else prt('?'); } prtln(""); prt("Delay : "); prtln(what->delai); return -1; } /* --------------------------------------------------------------- */