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

📄 flashhelper.h

📁 意法半导体ARM7 STR710+DM9000A的TCP/IP实现
💻 H
字号:
#ifndef __FLASHHELPER_H__
#define __FLASHHELPER_H__

#include "flash.h"
#include "71x_map.h"

#define INT_FLASH_BASE		0x40000000

#define EXT_FLASH_BASE		0x60000000
#define EXT_FLASH_SIZE		0x100000 // Words
#define EXT_FLASH_LIMIT		(EXT_FLASH_BASE + (EXT_FLASH_SIZE << 1))
#define SECTOR_SIZE			4096
#define BLOCK_SIZE			65536

void Flash_Init(void);
int IntFlash_Erase(u32 addr, u32 size);
int IntFlash_Program(u32 addr, const void *buf, u32 size);

void ExtFlash_Command(u32 addr, u32 cmd);
void ExtFlash_ChipErase(void);
int ExtFlash_SectorErase(u32 addr);
int ExtFlash_BlockErase(u32 addr);
int ExtFlash_WordWrite(u32 addr, u16 data);
int ExtFlash_Program(u32 addr, const void *buf, u32 size);

/*******************************************************************************
* Function Name  : FLASH_Delay
* Description    : Add the delay required for the Flash Write & Erase operation
* Input 1        : None
* Return         : None
*******************************************************************************/
void FLASH_Delay(void);

/*******************************************************************************
* Function Name  : FLASH_WriteBlock
* Description    : Writes Data To the Flash
* Input 1        : Address of the Data source
* Input 2        : Address of the Destination
* Input 3        : Nbr of words to be stored
* Return         : None
*******************************************************************************/
void FLASH_BlockWrite(u32 XsourceAdd, u32 XtargetAdd, u32 XdataLength);

#endif

⌨️ 快捷键说明

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