1.5wuling_zhuanjietou/SYSTEM/bsp_cpu_flash.h

36 lines
1.2 KiB
C
Raw Normal View History

2024-10-17 01:06:51 +00:00
/*
*********************************************************************************************************
*
* ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : cpu<EFBFBD>ڲ<EFBFBD>falsh<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>
* <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : bsp_cpu_flash.h
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> : V1.0
*
* Copyright (C), 2013-2014, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> www.armfly.com
*
*********************************************************************************************************
*/
#ifndef _BSP_CPU_FLASH_H_
#define _BSP_CPU_FLASH_H_
#include "Sys.h"
#define FLASH_BASE_ADDR 0x08000000 /* Flash<73><68><EFBFBD><EFBFBD>ַ */
#define FLASH_SIZE (128*1024) /* Flash <20><><EFBFBD><EFBFBD> */
/* <20><><EFBFBD><EFBFBD>F103<30><33> 128k FLASH , ÿ<><C3BF>PAGE = 2K <20>ֽڣ<D6BD><DAA3>ܹ<EFBFBD> 64<36><34> PAGE */
#define SECTOR_MASK 0xFFFFF800
#define FLASH_IS_EQU 0 /* Flash<73><68><EFBFBD>ݺʹ<DDBA>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD> */
#define FLASH_REQ_WRITE 1 /* Flash<73><68><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1>д */
#define FLASH_REQ_ERASE 2 /* Flash<73><68>Ҫ<EFBFBD>Ȳ<EFBFBD><C8B2><EFBFBD>,<2C><>д */
#define FLASH_PARAM_ERR 3 /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t bsp_ReadCpuFlash(uint32_t _ulFlashAddr, uint8_t *_ucpDst, uint32_t _ulSize);
uint8_t bsp_WriteCpuFlash(uint32_t _ulFlashAddr, uint8_t *_ucpSrc, uint32_t _ulSize);
uint8_t bsp_CmpCpuFlash(uint32_t _ulFlashAddr, uint8_t *_ucpBuf, uint32_t _ulSize);
#endif
/***************************** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> www.armfly.com (END OF FILE) *********************************/