/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.h * @brief : Header for main.c file. * This file contains the common defines of the application. ****************************************************************************** * @attention * *

© Copyright (c) 2021 STMicroelectronics. * All rights reserved.

* * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ /* USER CODE END Header */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H #define __MAIN_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32g0xx_hal.h" #include #define One 100 #define Zero 200 void Read_Para(void); void Enadble_module(uint8_t en); uint8_t check_flash_cfd(void); uint8_t check_flag(void); void Reflash_BL_Sta_Check(void); void Failure_handling(void); void Check_Rst(void); typedef struct { uint16_t Now_Version; uint8_t upgrade_flag; uint8_t boot_state; uint16_t iap_boot_state; }BL_Para; typedef struct Bak_info ///*/存放bak相关的所有参数 一次性读取 减少bl占用时间 { uint8_t Bak_sta[3]; ///bak空间的状态,0 - > iap 空间 1 - > bak1空间 2 - > bak2空间 uint16_t FW_Version[3]; ///bak空间中的固件版本号 存放固件版本的1000倍的整数 uint16_t FW_Ver_tim[3]; ///存放bak空间中固件的记录日期 ///具体算法为 高8位存放月的个数与年数*12的和 低八位存放日 } Bak_info; #endif /* __MAIN_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/