00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "Image.h"
00025 #include "Bases.h"
00026 #include "Module.h"
00027 #include "debug.h"
00028 #include "Common.h"
00029
00030 static bases_Modules_t *api;
00031 VERSION("Flash.image_id",1,0,"Gergely Gati","g.gati@freemail.hu");
00032
00033 static int flash_Recognize(u8 *data, int data_size)
00034 {
00035 int ret=-1;
00036
00037 debug_Begin();
00038
00039 if(data[0]=='F'&&data[1]=='W'&&data[2]=='S') ret=0;
00040
00041 debug_End();
00042
00043 return(ret);
00044 }
00045
00046
00047 static int flash_Init(u32 module)
00048 {
00049 int ret=-1;
00050 ret=api->img_Call(IMG_REGISTERFORMAT,
00051 TAG_IMG_NAME,(u32)"flash",
00052 TAG_IMG_MODULE,module,
00053 TAG_IMG_IMG_RECOGNIZE,flash_Recognize,
00054 TAG_DONE);
00055 return(ret);
00056 }
00057
00058 EXPORT int module_Init(u32 module, bases_Modules_t *bases)
00059 {
00060 api=bases;
00061 return(flash_Init(module));
00062 }