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

📄 flash.h

📁 基于东南大学开发的SEP3203的ARM7中的所有驱动
💻 H
字号:
#ifndef FLASH_H
#define FLASH_H

#include "cdevice.h"
#include "ppsmtype.h"
#include "fs.h"
#include "itron.h"

extern void FlashEraseBlock( U32 Address );
extern unsigned char FlashWriteByte( U32 Address, unsigned char Data );
extern U32 FlashWriteBlockWord(U32  Address,U32 DataPoint,U32 len);
extern U32 FlashWriteBlock( U32 Address, U32 Data, U32 len );
extern void FlashUnlockBlock( U32 Address );
extern void FlashLockBlock( U32 Address );
extern void CopyFlashProgram( );
extern void WriteFlashProgram( U32 Address, U32 data, unsigned long len );
extern unsigned long FlashReadByte( unsigned char buffer, U32 Address );
extern unsigned long FlashReadBlock( U32 buffer, U32 Address,  unsigned long len );
extern void FlashUnlockBlockX( U32 Address );
extern void FlashLockBlockX( U32 Address );
extern void FlashEraseBlockX( U32 Address );
extern void drv_flash_write ( unsigned char *data, unsigned int start, unsigned int size );
extern void drv_flash_read ( unsigned char *data, unsigned int start, unsigned int size );

extern int nand_read(U32 from, U32 len, U8 *buf);
extern int nand_read_page (U32 from,  U8 *buf);
extern int nand_read_block (U32 from,  U8 *buf);
extern int nand_write_page (U32 to, U8 *buf);
extern int nand_write_block (U32 to, U8 *buf);
extern int nand_write(U32 to, U32 len, U8 *buf);
extern int nand_erase_block(U32 blockhead);


typedef void (*	FBP)(U32 Address);    
typedef unsigned char (* FWP)(U32  Address,unsigned char Data);  
typedef U32 (* FWBP)(U32  Address,U32 Data,unsigned long len);
typedef unsigned long (* FRP)(unsigned char buffer, U32  Address);  
typedef unsigned long (* FRBP)(U32 buffer,U32 Address,unsigned long len);

extern FBP FlashUnlockBlockP;
extern FBP FlashLockBlockP;
extern FBP FlashEraseBlockP;
extern FWP FlashWriteByteP;
extern FWBP FlashWriteBlockWordP;
extern FWBP FlashWriteBlockP;
extern FBP FlashUnlockBlockXP;
extern FBP FlashLockBlockXP;
extern FBP FlashEraseBlockXP;

//extern int nor_write_word(U32 page, U32*buffer, U32 num);
extern int nor_wr_page(U32 page, U32*buffer);
extern int nor_wr_block (U32 page, U32*buffer,  U32 do_read);
extern int nor_erase_block(U32 page);
extern int nor_write_page_format(U32 page, U32 *buffer,  U32 do_read);
extern int nor_rd_io(U16 driveno, U32 page, void *buffer, U16 count, int do_read);

//extern int nor_write_word(U32 page, U32*buffer, U32 num);
extern int norflash_write_page_format(U32 page, U32 *buffer,  U32 do_read);
extern INT norflash_rd_io(U16 driveno, U32 page, VOID *buffer, U16 count, INT do_read);

#endif /* FLASH_H */

⌨️ 快捷键说明

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