ex_file_image.c

This example code will update the File System Image. When the FSEE (external EEPROM) File System is used for example, this means that this is basically a write to the EEPROM chip. All data will be overwritten!

If the write process has to be interrupted for some reason (it takes too long) before the fsysCloseImage() function is called, then the fileRelease(0) function has to be called. When returning to the function (and completing the writing of the File System), we will continue with the fsysPutByteImage(c) function calls until the whole File System Image has been written.

00001 included "fsee.h"
00002 
00016 void writeImage(void) {
00017     BYTE c;
00018 
00019     //Prepare the File System to receive a new Image - all data is overwritten! It is
00020     //assigned handle 0
00021     fsysOpenImage();
00022 
00023     while (1) {
00024         //Get next byte of File System Image
00025         c = ....
00026         
00027         //Write a byte to the File System Image file
00028         fsysPutByteImage(c);
00029         
00030         //If finished writing File System Image, break
00031         if (...)
00032             break;
00033     }
00034     
00035     //Finished writing new File System Image
00036     fsysCloseImage();
00037 }

Generated on Mon Oct 9 13:22:06 2006 for SBC65EC Web Server by  doxygen 1.4.7