You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
474 B

#ifndef FLASH_OPERATION_H
#define FLASH_OPERATION_H
#include "stm32g4xx_hal.h"
#include <stdint.h>
/* 定义Flash存储地址 - 使用最后一页 */
#define FLASH_BASE_ADDRESS 0x08000000
#define DATA_FLASH_ADDRESS (FLASH_BASE_ADDRESS + FLASH_SIZE - FLASH_PAGE_SIZE)
#define PARAM_COUNT 12
/* 函数声明 */
HAL_StatusTypeDef WriteParametersToFlash(int16_t *parameters);
void ReadParametersFromFlash(int16_t *parameters);
#endif /* FLASH_OPERATION_H */