diff options
Diffstat (limited to 'flash.c')
-rw-r--r-- | flash.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2,7 +2,7 @@ int readUserBlock(FlashStruct *mem) { - // read the flash.copy file into the globals.Flash struct + // read the /root/flash.copy file into the mem struct // and return the number of bytes read in // if the file does not exist, then "return 0"; @@ -11,9 +11,9 @@ int readUserBlock(FlashStruct *mem) void writeUserBlock(FlashStruct *mem, int addr, int numbytes) { - // check if flash.copy file exists + // check if /root/flash.copy file exists // - if it does, update the requested address and - // number of bytes + // number of bytes, use fseek / fwrite / fflush // - if does not, create the file and // set addr = 0, numbytes = sizeof (mem) @@ -37,6 +37,7 @@ void initFlash(FlashStruct *mem) mem->channels = (short) 1; mem->enable_avrq_extra_ampls = (char) 12; mem->ChanKey_frequency = (char) 0; + // much more needs to be added here - later // save the default Flash config, for nonvolatile persistence writeUserBlock(mem, 0, sizeof(mem)); |