diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-16 14:02:46 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-16 14:02:46 -0400 |
commit | 2e41ddb6fe7b802a92787c77ce91ca792a32b1fa (patch) | |
tree | 5bf9c2729c7e288c4d9ed48a9204c37fd79655ff /flash.c | |
parent | e94427e2d85dfc409a4f89c263d727dedcdb3a52 (diff) |
added some comments
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)); |