flash.h

来自「ESS3890+SL原代码(1*16内存)」· C头文件 代码 · 共 91 行

H
91
字号
/* Copyright 2002, ESS Technology, Inc.					*//* SCCSID @(#)flash.h	4.1 11/05/02 *//* * $Log$  */#ifndef _FLASH_H_#define _FLASH_H_/************************************************************************ You must define one and only one of the following.*************************************************************************/#define	FLASH_256K_8b#undef	FLASH_512K_8b#undef	FLASH_1024K_8b#undef	FLASH_512Kx2_8b#undef	FLASH_512Kx2_16b/************************************************************************ TOTALBLOCK is the number of blocks per device. ROM_SIZE is the total amount of flash you have in Kbytes.*************************************************************************/#ifdef FLASH_256K_8b    #undef	FLASH_16BIT    #define	ROM_SIZE	256    #define	TOTALBLOCK	4#endif#ifdef FLASH_512K_8b    #undef	FLASH_16BIT    #define	ROM_SIZE	512    #define	TOTALBLOCK	8#endif#ifdef FLASH_1024K_8b    #undef	FLASH_16BIT    #define	ROM_SIZE	1024    #define	TOTALBLOCK	16#endif#ifdef FLASH_512Kx2_8b    #undef	FLASH_16BIT    #define	ROM_SIZE	1024    #define	TOTALBLOCK	8#endif#ifdef FLASH_512Kx2_16b    #define	FLASH_16BIT    #define	ROM_SIZE	1024    #define	TOTALBLOCK	8#endif/************************************************************************ Three defines should cover all cases: FLASH_16BIT, ROM_SIZE, TOTALBLOCK*************************************************************************/#ifdef FLASH_16BIT    #define FlashBlockSize	        (0x10000 * 2)    #define RESET_FLASH *(volatile short *) COM_ADDR[0]=0xf0f0#else	/* 8-bit bus */    #define FlashBlockSize	        0x10000    #define RESET_FLASH *(volatile char *) COM_ADDR[0]=0xf0#endif/************************************************************************ Common *************************************************************************/#ifndef int32typedef long int32;#endif#define FHUGE/************************************************************************** * Public variables **************************************************************************/extern int FLASHBASE;extern uchar logo4update[];extern uchar rom4update[];/************************************************************************** * Public routines **************************************************************************/int update_logo(int, int);int update_flash(int, int);#endif _FLASH_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?