flashhelper.h
来自「STR71X系列ARM微控制器原理与实践配套光盘」· C头文件 代码 · 共 45 行
H
45 行
#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 + =
减小字号Ctrl + -
显示快捷键?