|
@ -86,6 +86,9 @@ int8_t config_flash_write(void) |
|
|
{ |
|
|
{ |
|
|
HAL_StatusTypeDef status; |
|
|
HAL_StatusTypeDef status; |
|
|
uint32_t config_flash_write_start_address = FLASH_START_ADDRESS; |
|
|
uint32_t config_flash_write_start_address = FLASH_START_ADDRESS; |
|
|
|
|
|
|
|
|
|
|
|
__disable_irq(); // 关闭全部中断 |
|
|
|
|
|
|
|
|
status = FlashErase(); |
|
|
status = FlashErase(); |
|
|
if (status != HAL_OK) |
|
|
if (status != HAL_OK) |
|
|
{ |
|
|
{ |
|
@ -101,5 +104,7 @@ int8_t config_flash_write(void) |
|
|
FLASH_WRITE(s_config.localport); |
|
|
FLASH_WRITE(s_config.localport); |
|
|
FLASH_WRITE(s_config.config_writed_flag); |
|
|
FLASH_WRITE(s_config.config_writed_flag); |
|
|
|
|
|
|
|
|
|
|
|
__enable_irq(); // 开启全部中断 |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |