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.

included "fsee.h"

void writeImage(void) {
    BYTE c;

    //Prepare the File System to receive a new Image - all data is overwritten! It is
    //assigned handle 0
    fsysOpenImage();

    while (1) {
        //Get next byte of File System Image
        c = ....
        
        //Write a byte to the File System Image file
        fsysPutByteImage(c);
        
        //If finished writing File System Image, break
        if (...)
            break;
    }
    
    //Finished writing new File System Image
    fsysCloseImage();
}

Generated on Wed Feb 3 12:45:33 2010 for SBC65EC Web Server by  doxygen 1.5.8