MS-DTU/Loader_ZNY/User/fmc_flash.h

32 lines
959 B
C

/*
*********************************************************************************************************
* IAR Development Kits
* on the
*
* M451
*
* Filename : fmc_flash.h
* Version : V1.00
* Programmer(s) : Qian Xianghong
*********************************************************************************************************
*/
#ifndef USER_FMC_FLASH_PRESENT
#define USER_FMC_FLASH_PRESENT
#include "stm32l4xx_hal_flash.h"
#include "stm32l4xx_hal_flash_ex.h"
#include "type.h"
// Flash可擦除块大小
#define FLASH_ERASE_SIZE 2048
// 读Flash全局缓冲
extern uint8_t Flash_rdBuf[FLASH_ERASE_SIZE];
uint8_t Flash_BufferVerify(uint32_t Addr, uint8_t *buf, uint32_t nbytes);
void Flash_BufferRead(uint32_t Addr, uint8_t *buf, uint32_t nbytes);
void Flash_BufferWrite(uint32_t Addr, uint8_t *buf, uint32_t nbytes);
#endif