fix(vd960DBN): 修复 offlog 编译错误 — 声明补齐 + RCC 宏移入公共头
MRS 编译报错: 1. offlog.c: SPI_Flash_Erase_Sector 隐式声明 → storage.h 补声明 2. peripheral_main.c: OFFLOG_RCC_RSTSCKR 未声明 → RCC 宏从 offlog.c 移到 offlog.h (peripheral_main.c 只 include offlog.h) 3. offlog.c 删除本地重复 RCC 宏定义 单测重跑 ALL PASS
This commit is contained in:
@@ -31,11 +31,6 @@ static uint16_t _boot_seq; /* 当前 boot 序号 */
|
||||
static uint32_t _count; /* 有效记录数 (0..8064) */
|
||||
static uint8_t _ready; /* init 完成标志 */
|
||||
|
||||
/* 复位原因寄存器 (CH32V20x RCC 基址 0x40021000, RSTSCKR 偏移 0x24,
|
||||
STM32F1 兼容布局; 若实际硬件布局不同, 读出的原因位会异常, 待板上验证) */
|
||||
#define OFFLOG_RCC_BASE 0x40021000UL
|
||||
#define OFFLOG_RCC_RSTSCKR (*(volatile uint32_t *)(OFFLOG_RCC_BASE + 0x24UL))
|
||||
|
||||
/*===========================================================================
|
||||
* 基础读写
|
||||
*===========================================================================*/
|
||||
|
||||
Reference in New Issue
Block a user