📄 flash.h
字号:
/* openbios/include/FLASH.H, redbios, redbios_iii_1.0 3/23/98 11:41:19 *//*-----------------------------------------------------------------------------+|| This source code has been made available to you by IBM on an AS-IS| basis. Anyone receiving this source is licensed under IBM| copyrights to use it in any way he or she deems fit, including| copying it, modifying it, compiling it, and redistributing it either| with or without modifications. No license under IBM patents or| patent applications is to be implied by the copyright license.|| Any user of this software should understand that IBM cannot provide| technical support for this software and will not be responsible for| any consequences resulting from the use of this software.|| Any person who transfers this source code or any derivative work| must include the IBM copyright notice, this paragraph, and the| preceding two paragraphs in the transferred software.|| COPYRIGHT I B M CORPORATION 1995| LICENSED MATERIAL - PROGRAM PROPERTY OF I B M+-----------------------------------------------------------------------------*//*-----------------------------------------------------------------------------+|| Date Description of Change BY| --------- --------------------- ---| 31-Jan-02 Rewrite for SHARP LH28F160BVE/LH28F160BJE device YYD+-----------------------------------------------------------------------------*//* * Flash defines */typedef struct sect_map { unsigned long start_addr;} sect_map_t; //#define DEV_LH28F160BVE_BTL#define DEV_LH28F160BVE_TTL//#define DEV_LH28F160BJE_BTL//#define DEV_LH28F160BJE_TTL#if defined(DEV_LH28F160BVE_BTL) || defined(DEV_LH28F160BJE_BTL)#ifdef DEV_LH28F160BJE_BTL #define DEVICE_ID 0xB0E9 // sharp LH28F160BJE-BTL#else #define DEVICE_ID 0xB049 // sharp LH28F160BVE-BTL#endif#define NUM_SECTORS 78static sect_map_t flash_map[NUM_SECTORS+1] = {/* dev 1, bsec 0 */ { 0x7fc00000 },/* bsec 1 */ { 0x7fc02000 },/* psec 0 */ { 0x7fc04000 },/* psec 1 */ { 0x7fc06000 },/* psec 2 */ { 0x7fc08000 },/* psec 3 */ { 0x7fc0a000 },/* psec 4 */ { 0x7fc0c000 },/* psec 5 */ { 0x7fc0e000 },/* msec 00 */ { 0x7fc10000 },/* msec 01 */ { 0x7fc20000 },/* msec 02 */ { 0x7fc30000 },/* msec 03 */ { 0x7fc40000 },/* msec 04 */ { 0x7fc50000 },/* msec 05 */ { 0x7fc60000 },/* msec 06 */ { 0x7fc70000 },/* msec 07 */ { 0x7fc80000 },/* msec 08 */ { 0x7fc90000 },/* msec 09 */ { 0x7fca0000 },/* msec 10 */ { 0x7fcb0000 },/* msec 11 */ { 0x7fcc0000 },/* msec 12 */ { 0x7fcd0000 },/* msec 13 */ { 0x7fce0000 },/* msec 14 */ { 0x7fcf0000 },/* msec 15 */ { 0x7fd00000 },/* msec 16 */ { 0x7fd10000 },/* msec 17 */ { 0x7fd20000 },/* msec 18 */ { 0x7fd30000 },/* msec 19 */ { 0x7fd40000 },/* msec 20 */ { 0x7fd50000 },/* msec 21 */ { 0x7fd60000 },/* msec 22 */ { 0x7fd70000 },/* msec 23 */ { 0x7fd80000 },/* msec 24 */ { 0x7fd90000 },/* msec 25 */ { 0x7fda0000 },/* msec 26 */ { 0x7fdb0000 },/* msec 27 */ { 0x7fdc0000 },/* msec 28 */ { 0x7fdd0000 },/* msec 29 */ { 0x7fde0000 },/* msec 30 */ { 0x7fdf0000 },/* dev 0, bsec 0 */ { 0x7fe00000 },/* bsec 1 */ { 0x7fe02000 },/* psec 0 */ { 0x7fe04000 },/* psec 1 */ { 0x7fe06000 },/* psec 2 */ { 0x7fe08000 },/* psec 3 */ { 0x7fe0a000 },/* psec 4 */ { 0x7fe0c000 },/* psec 5 */ { 0x7fe0e000 },/* msec 00 */ { 0x7fe10000 },/* msec 01 */ { 0x7fe20000 },/* msec 02 */ { 0x7fe30000 },/* msec 03 */ { 0x7fe40000 },/* msec 04 */ { 0x7fe50000 },/* msec 05 */ { 0x7fe60000 },/* msec 06 */ { 0x7fe70000 },/* msec 07 */ { 0x7fe80000 },/* msec 08 */ { 0x7fe90000 },/* msec 09 */ { 0x7fea0000 },/* msec 10 */ { 0x7feb0000 },/* msec 11 */ { 0x7fec0000 },/* msec 12 */ { 0x7fed0000 },/* msec 13 */ { 0x7fee0000 },/* msec 14 */ { 0x7fef0000 },/* msec 15 */ { 0x7ff00000 },/* msec 16 */ { 0x7ff10000 },/* msec 17 */ { 0x7ff20000 },/* msec 18 */ { 0x7ff30000 },/* msec 19 */ { 0x7ff40000 },/* msec 20 */ { 0x7ff50000 },/* msec 21 */ { 0x7ff60000 },/* msec 22 */ { 0x7ff70000 },/* msec 23 */ { 0x7ff80000 },/* msec 24 */ { 0x7ff90000 },/* msec 25 */ { 0x7ffa0000 },/* msec 26 */ { 0x7ffb0000 },/* msec 27 */ { 0x7ffc0000 },/* msec 28 */ { 0x7ffd0000 },/* msec 29 */ { 0x7ffe0000 },/* msec 30 */ { 0x7fff0000 },/*End, secend */ { 0x80000000 } };#elif defined(DEV_LH28F160BVE_TTL) || defined(DEV_LH28F160BJE_TTL)#ifdef DEV_LH28F160BJE_TTL #define DEVICE_ID 0xB0E8 // sharp LH28F160BJE-TTL#else #define DEVICE_ID 0xB048 // sharp LH28F160BVE-TTL#endif#define NUM_SECTORS 78static sect_map_t flash_map[NUM_SECTORS+1] = {/* dev 1, msec 00 */ { 0x7fc00000 },/* msec 01 */ { 0x7fc10000 },/* msec 02 */ { 0x7fc20000 },/* msec 03 */ { 0x7fc30000 },/* msec 04 */ { 0x7fc40000 },/* msec 05 */ { 0x7fc50000 },/* msec 06 */ { 0x7fc60000 },/* msec 07 */ { 0x7fc70000 },/* msec 08 */ { 0x7fc80000 },/* msec 09 */ { 0x7fc90000 },/* msec 10 */ { 0x7fca0000 },/* msec 11 */ { 0x7fcb0000 },/* msec 12 */ { 0x7fcc0000 },/* msec 13 */ { 0x7fcd0000 },/* msec 14 */ { 0x7fce0000 },/* msec 15 */ { 0x7fcf0000 },/* msec 16 */ { 0x7fd00000 },/* msec 17 */ { 0x7fd10000 },/* msec 18 */ { 0x7fd20000 },/* msec 19 */ { 0x7fd30000 },/* msec 20 */ { 0x7fd40000 },/* msec 21 */ { 0x7fd50000 },/* msec 22 */ { 0x7fd60000 },/* msec 23 */ { 0x7fd70000 },/* msec 24 */ { 0x7fd80000 },/* msec 25 */ { 0x7fd90000 },/* msec 26 */ { 0x7fda0000 },/* msec 27 */ { 0x7fdb0000 },/* msec 28 */ { 0x7fdc0000 },/* msec 29 */ { 0x7fdd0000 },/* msec 30 */ { 0x7fde0000 },/* bsec 0 */ { 0x7fdf0000 },/* bsec 1 */ { 0x7fdf2000 },/* psec 0 */ { 0x7fdf4000 },/* psec 1 */ { 0x7fdf6000 },/* psec 2 */ { 0x7fdf8000 },/* psec 3 */ { 0x7fdfa000 },/* psec 4 */ { 0x7fdfc000 },/* psec 5 */ { 0x7fdfe000 }, /* dev 0, msec 00 */ { 0x7fe00000 },/* msec 01 */ { 0x7fe10000 },/* msec 02 */ { 0x7fe20000 },/* msec 03 */ { 0x7fe30000 },/* msec 04 */ { 0x7fe40000 },/* msec 05 */ { 0x7fe50000 },/* msec 06 */ { 0x7fe60000 },/* msec 07 */ { 0x7fe70000 },/* msec 08 */ { 0x7fe80000 },/* msec 09 */ { 0x7fe90000 },/* msec 10 */ { 0x7fea0000 },/* msec 11 */ { 0x7feb0000 },/* msec 12 */ { 0x7fec0000 },/* msec 13 */ { 0x7fed0000 },/* msec 14 */ { 0x7fee0000 },/* msec 15 */ { 0x7fef0000 },/* msec 16 */ { 0x7ff00000 },/* msec 17 */ { 0x7ff10000 },/* msec 18 */ { 0x7ff20000 },/* msec 19 */ { 0x7ff30000 },/* msec 20 */ { 0x7ff40000 },/* msec 21 */ { 0x7ff50000 },/* msec 22 */ { 0x7ff60000 },/* msec 23 */ { 0x7ff70000 },/* msec 24 */ { 0x7ff80000 },/* msec 25 */ { 0x7ff90000 },/* msec 26 */ { 0x7ffa0000 },/* msec 27 */ { 0x7ffb0000 },/* msec 28 */ { 0x7ffc0000 },/* msec 29 */ { 0x7ffd0000 },/* msec 30 */ { 0x7ffe0000 },/* bsec 0 */ { 0x7fff0000 },/* bsec 1 */ { 0x7fff2000 },/* psec 0 */ { 0x7fff4000 },/* psec 1 */ { 0x7fff6000 },/* psec 2 */ { 0x7fff8000 },/* psec 3 */ { 0x7fffa000 },/* psec 4 */ { 0x7fffc000 },/* psec 5 */ { 0x7fffe000 },/*End, secend */ { 0x80000000 } };#else #error "Unsupported Flash device !"#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -