|
| fs_Init| Summary | |
#include <file_config.h>
int fs_Init (
U32 adr, /* base address */
U32 clk); /* CPU clock frequency */
| | Description | | The fs_Init function is a user-provided routine that initializes the Flash programming algorithm for the Flash File System. It is invoked by the finit function on system startup.
The adr argument specifies the Flash Device base address as specified in the configuration file. The clk argument specifies the CPU clock frequency (which may be used to adjust the timing of Flash programming algorithms).The fs_Init function is part of RL-FlashFS. The prototype is defined in file_config.h. You can customize the function in fs_flashprg.c. | | Return Value | | The fs_Init function returns a value of 0 if successful or a value of 1 if unsuccessful. | | See Also | | finit, fs_EraseSector, fs_ProgramPage | | Example | |
int fs_Init (U32 adr, U32 clk)
{
/* Supress compiler warning of unreferenced "clk" */
clk = clk;
base_adr = adr;
return (0);
}
|
|
|