4 #define FLASH_END_ADDR 0xffffffff
5 #define FLASH_ADDR_BASE 0xff800000
6 #define BOOT_ADDR_BASE 0xfffc0000
7 #define BOOT_ADDR_BASE_OFF 0x7c0000
8 #define FLASH_SIZE 0x800000
9 #define BOOT_SIZE 0x40000
11 //#define NVRAM_ADDR_BASE 0xfff90000
12 //#define NVRAM_ADDR_BASE_OFF 0x790000
13 //#define NVRAM_SIZE 0x10000
15 #define PID_OFFSET (BOOT_SIZE- 0x46)
16 #define NODE_ADDRESS (BOOT_SIZE-0x60)
17 #define NODE_BASE_OFF (FLASH_SIZE-0x60)
18 #define PIN_ADDRESS (BOOT_SIZE-0x70)//WPS PIN,8bytes
19 #define PIN_OFF (FLASH_SIZE-0x70)
20 #define KERNEL_CODE_OFFSET 0
21 #define SN_ADDRESS (BOOT_SIZE-0x80) //12bytes
22 #define SN_OFF (FLASH_SIZE-0x80)
25 #define UPGRADE_START_OFFSET 0
26 #define UPGRADE_END_OFFSET 0x7A0000
27 #define PRODUCT_ID_OFFSET 0x75ffe0//(UPGRADE_END_OFFSET - 0x10)
28 #define PROTOCOL_ID_OFFSET (PRODUCT_ID_OFFSET + 0x02)
29 #define FW_VERSION_OFFSET (PRODUCT_ID_OFFSET + 0x04)
30 #define SIGN_OFFSET (PRODUCT_ID_OFFSET + 0x08) /* eRcOmM */
32 //#define LANG_UPGRADE
34 #define LANGBUF_BEGIN 0x1300000
35 #define LANGBUF_END 0x1f00000
36 #define LANGBUF_LENTH (LANGBUF_END - LANGBUF_BEGIN)
56 void Led_Power(int value
);
57 void Led_security(int value
);
60 static unsigned short xchg ( unsigned short dwData
);
61 int FlashDriver(unsigned long dlAddress
,unsigned char *dbData
,unsigned long dlLength
,unsigned long dlFlag
);
62 int ProgramChip(unsigned long dlAddress
,unsigned char * dbData
,unsigned long dlLength
);
63 int dl_Initialize(void);
64 void dl_GetAddr(unsigned char *node
);
66 int dl_Transmit(char *buf
,int len
);
68 void AssignHWAddress(unsigned char *psBuffer
);
69 int ResetChip(unsigned long ulRomDstAddr
);
70 int GetFlashType(void);
73 int save_lang_buf(unsigned long flash_addr
, char *mem_addr
,unsigned long length
);
74 int LangDriver(unsigned long flash_addr
, char *mem_addr
,unsigned long length
, unsigned long dlFlag
);
This page took 0.073348 seconds and 5 git commands to generate.