#ifndef _FLASH_H_ #define _FLASH_H_ /* includes ----------------------------------------------------------*/ #include "stm32f1xx_hal.h" /* typedef -----------------------------------------------------------*/ /* define ------------------------------------------------------------*/ #define APP1_ADDRESS ((unsigned int)0x8002800U) // 0x8002800-0x8040C00 249k #define APP2_ADDRESS ((unsigned int)0x8040C00U) // 0x8040C00-0x807F000 249k #define PARAM_ADDRESS ((unsigned int)0x807F000U) // 0x807F000-0x80800000 4k /* macro -------------------------------------------------------------*/ /* variables ---------------------------------------------------------*/ /* function prototypes -----------------------------------------------*/ // @brief 参数区数据读取 void Read_ParamArea(void); // @brief 向量重映射 void Remap_Vector_Table(void); // @brief flash按字写入 HAL_StatusTypeDef FLASH_Write(uint32_t address, uint32_t *data, uint32_t length); #endif