feat(config): add USE_PCF8563 build switch to run without the RTC chip
Some PCB variants may not populate the PCF8563. Guards RTC init/read in HomeApp_OnStart(), the WriteDateTime() save in SetClockApp, and the I2C/RTC diagnostic scans in Self_Test() behind #if USE_PCF8563. When disabled, the firmware runs entirely on the Timer1-driven software clock; date/time just won't survive a power cycle without the chip.
This commit is contained in:
@@ -174,4 +174,9 @@ extern volatile u16 comb_hold; // 组合键持续按下计时器
|
||||
#define MAIN_Fosc 24000000UL // STC32G 主频工作频率定义 (24.0 MHz)
|
||||
#define CLONED_ADDR 0x37A86UL // 手环自身克隆发射的默认 24 位射频出厂 ID 地址
|
||||
|
||||
// 硬件模块使能开关:某些 PCB 版本可能不焊接 PCF8563 RTC 芯片,置 0 后完全跳过
|
||||
// I2C 探测/读写与开机诊断扫描,只依赖软件时钟 (Timer1 驱动的 current_hour/min/sec 等),
|
||||
// 不写入/不写回 RTC,断电后时间不保留,但整机功能不受影响。
|
||||
#define USE_PCF8563 1
|
||||
|
||||
#endif // __CONFIG_H__
|
||||
|
||||
Reference in New Issue
Block a user