資源簡(jiǎn)介
將官方固件庫(kù)的flash模擬eeprom。移植到標(biāo)準(zhǔn)庫(kù)上,并改正官方transfer的錯(cuò)誤,優(yōu)化了部分細(xì)節(jié),并增加了多自己寫入和多字節(jié)讀取接口。
代碼片段和文件信息
#include?“stm32f4xx_eeprom.h“
#include?“delay.h“
#include?“k7_timer.h“
/**
?*??@file?:?stm32f4xx_eeprom.c
?*??@brief:?stm32?flash?模擬?EEPROM
?*??@process??:?(1)??FLASH_Unlock();???????????//解除flash限制
?*??????????????(2)??EE_Init()??????????????????//初始化flash
?*??????????????(3)??EE_WriteVariable(uint16_t?VirtAddress?void?*Data?uint16_t?len)???//寫操作
?*???????????????????EE_ReadVariable(uint16_t?VirtAddress?void?*Data?uint16_t?len)???//讀操作
?*??????????????(4)??FLASH_Lock();?????????????//記得鎖住,以免flash隨意改動(dòng)
?*/
/*?Global?variable?used?to?store?variable?value?in?read?sequence?*/
static?uint8_t?DatWorkBuf[EEPROM_CELL_DATA_LEN];//data?work?buffer
/*?Variable?used?for?Erase?sectors?under?interruption?*/
static?uint16_t?EE_FindValidPage(uint8_t?Operation);
static?uint16_t?EE_VerifyPageFullWriteVariable(uint16_t?VirtAddress?void?*data?uint16_t?len);
static?uint16_t?EE_PageTransfer(uint16_t?VirtAddress?void?*data?uint16_t?Len);
static?uint16_t?EE_VerifyPageFullyEra
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????10425??2017-07-24?18:52??stm32f4xx_eeprom.h
?????文件??????13761??2017-07-23?11:03??stm32f4xx_eeprom_hal.c
?????文件??????28001??2017-07-24?22:04??stm32f4xx_eeprom.c
-----------?---------??----------?-----??----
????????????????52187????????????????????3
- 上一篇:simbad 仿真器
- 下一篇:unity shader水波水紋
評(píng)論
共有 條評(píng)論