flash(6006).h 978 B

123456789101112131415161718192021222324252627
  1. #ifndef _FLASH_H_
  2. #define _FLASH_H_
  3. /* includes ----------------------------------------------------------*/
  4. #include "stm32f1xx_hal.h"
  5. /* typedef -----------------------------------------------------------*/
  6. /* define ------------------------------------------------------------*/
  7. #define APP1_ADDRESS ((unsigned int)0x8002800U) // 0x8002800-0x8040C00 249k
  8. #define APP2_ADDRESS ((unsigned int)0x8040C00U) // 0x8040C00-0x807F000 249k
  9. #define PARAM_ADDRESS ((unsigned int)0x807F000U) // 0x807F000-0x80800000 4k
  10. /* macro -------------------------------------------------------------*/
  11. /* variables ---------------------------------------------------------*/
  12. /* function prototypes -----------------------------------------------*/
  13. // @brief 参数区数据读取
  14. void Read_ParamArea(void);
  15. // @brief 向量重映射
  16. void Remap_Vector_Table(void);
  17. // @brief flash按字写入
  18. HAL_StatusTypeDef FLASH_Write(uint32_t address, uint32_t *data, uint32_t length);
  19. #endif