at25f1024.h

来自「EP9315的wince下载程序。download.exe」· C头文件 代码 · 共 57 行

H
57
字号
//****************************************************************************
//
// at25f1024.h - the at25f1024 eeprom declaration for ep93xx
//
// Copyright (c) 2006 Cirrus Logic, Inc.
//
//****************************************************************************
#ifndef AT25F1024_H
#define AT25F1024_H

//-----------------------------------------------------------------------------
//  at25f1024 command definitions 
//-----------------------------------------------------------------------------
#define AT25F1024_SET_WRITE_ENABLE                0x06
#define AT25F1024_RESET_WRITE_ENABLE              0x04
#define AT25F1024_READ_STATUS_REGISTER            0x05
#define AT25F1024_WRITE_STATUS_REGISTER           0x01
#define AT25F1024_READ_DATA                       0x03
#define AT25F1024_PROGRAM_DATA                    0x02
#define AT25F1024_SECTOR_ERASE                    0x52
#define AT25F1024_CHIP_ERASE                      0x62
#define AT25F1024_READ_MANUFACTURER_PRODUCT_ID    0x15

//-----------------------------------------------------------------------------
//  at25f1024 manufacturer code definitions 
//-----------------------------------------------------------------------------
#define ATMEL_ID                                  0x1F

//-----------------------------------------------------------------------------
//  at25f1024 device code definitions 
//----------------------------------------------------------------------------- 
#define ATMEL_AT25F1024                           0x60

//-----------------------------------------------------------------------------
// at25f1024 status register 
//-----------------------------------------------------------------------------
 
#define AT25F1024_STATUS_READY                    0x01
#define AT25F1024_STATUS_WRITE                    0x02  
  
//****************************************************************************
// at25f1024 specified function.
//****************************************************************************
extern void init_at25f1024(void);
extern int query_at25f1024(unsigned int manu_id,unsigned int device_id);
extern int erase_at25f1024(unsigned int addr, int length);
extern int program_at25f1024(unsigned int addr, unsigned char *pBuffer, int length);	
extern unsigned long read_at25f1024(unsigned int start, unsigned char *pBuffer, int numBytes);

//****************************************************************************
//    Maybe you can add other eeprom support.
//****************************************************************************



#endif // AT25F1024_H

⌨️ 快捷键说明

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