⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intel.h

📁 嵌入式系统 EP93xx处理器
💻 H
字号:
//****************************************************************************//// INTEL.h - The intel flash function definition.//// Copyright (c) 2006 Cirrus Logic, Inc.////****************************************************************************#ifndef INTEL_H#define INTEL_H#ifdef __cplusplusextern "C" {#endif//****************************************************************************// 16-bit bus command set//****************************************************************************#define QUERY_START_OFFSET                  0x10#define CMD_PROGRAM_SETUP                   0x40#define CMD_BASE_FLASH_ADDRESS              0x00#define CMD_READ_STATUS_REGISTER            0x70#define CMD_CLEAR_STATUS_REGISTER           0x50#define CMD_READ_ID_CODES                   0x90#define CMD_READ_QUERY                      0x98#define CMD_BLOCK_ERASE                     0x20#define CMD_CONFIRM                         0xD0#define CMD_READ_ARRAY                      0xff#define CMD_CONFIG_SETUP                    0x60// Status Register Values#define CMD_BLOCK_LOCKED                    0x02#define CMD_PROGRAM_SUSPENDED               0x04#define CMD_VPP_LOW                         0x08#define CMD_PROGRAM_ERROR                   0x10#define CMD_ERASE_ERROR                     0x20#define CMD_ERASE_SUSPENDED                 0x40#define CMD_STATUS_READY                    0x80// x8 flash command definitions#define X8_CMD_PROGRAM_SETUP                0x40#define X8_CMD_BASE_FLASH_ADDRESS           0x00#define X8_CMD_READ_STATUS_REGISTER         0x70#define X8_CMD_CLEAR_STATUS_REGISTER        0x50#define X8_CMD_READ_ID_CODES                0x90#define X8_CMD_READ_QUERY                   0x98#define X8_CMD_BLOCK_ERASE                  0x20#define X8_CMD_CONFIRM                      0xD0#define X8_CMD_READ_ARRAY                   0xff#define X8_CMD_CONFIG_SETUP                 0x60#define X8_CMD_BLOCK_LOCKED                 0x02#define X8_CMD_PROGRAM_SUSPENDED            0x04#define X8_CMD_VPP_LOW                      0x08#define X8_CMD_PROGRAM_ERROR                0x10#define X8_CMD_ERASE_ERROR                  0x20#define X8_CMD_ERASE_SUSPENDED              0x40#define X8_CMD_STATUS_READY                 0x80// Some data structtypedef unsigned char   TMPL_FDATA_X8;              /* flash data item */typedef unsigned short  TMPL_FDATA_X16;             /* flash data item */typedef unsigned long   TMPL_FDATA_X32;             /* flash data item */typedef unsigned long   TMPL_FDATA_ILX32;           /* flash data item */typedef unsigned short  TMPL_FDATA_PX16_B3C3J3;     /* flash data item */typedef unsigned long   TMPL_FDATA_PX16_P30;        /* flash data item */// Flash sub type#define IntelSubTypeB3C3                    0#define IntelSubTypeJ3                      1#define IntelSubTypeP30                     2//Flash manufacturer code#define IntelID                             0x0089#define IntelB3C3ID                         0x0089#define IntelJ3ID                           0x0089#define IntelP30ID                          0x0089#define MicronID                            0x002c#define SharpID                             0x00b0//Flash device id#define  IntelB3_4M                         0x8895#define  IntelB3_8M                         0x8893#define  IntelB3_16M                        0x8891#define  IntelB3_32M                        0x8897#define IntelC3_8M                          0x88c1#define IntelC3_16M                         0x88c3#define IntelC3_32M                         0x88c5#define IntelC3_64M                         0x88cd#define IntelJ3_32M                         0x0016#define IntelJ3_64M                         0x0017#define IntelJ3_128M                        0x0018#define IntelJ3_256M                        0x001D#define IntelP30_64M                        0x8817#define IntelP30_128M                       0x8818#define IntelP30_256M                       0x8819//****************************************************************************//// Intel specified function.////****************************************************************************int IntelFlashQuery(struct FlashInfo *pInfo);int IntelFlashEraseSector(struct FlashInfo *pInfo, int iSector);int IntelFlashErase(struct FlashInfo *pInfo, int iOffset, int len);int IntelFlashProgramSector(struct FlashInfo *pInfo, int iOffset, void *data, int len);int IntelFlashProgram(struct FlashInfo *pInfo, int iOffset, void *data, int len);#ifdef __cplusplus}#endif#endif /*INTEL_H*/

⌨️ 快捷键说明

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