debug: 增加 KEY_SOS 物理按键开机自检与运行期电平跳变串口调试打印

This commit is contained in:
2026-07-29 10:04:00 +08:00
parent 2f4dd2660d
commit 48db6523fb
2 changed files with 18 additions and 0 deletions

View File

@@ -212,6 +212,11 @@ void Self_Test(void)
Uart_SendByte((u8)('0' + (key_down_adc % 10)));
Uart_SendString(" [OK]\r\n");
// 2.2 检测 KEY_SOS (P2.6) 物理电平常态
Uart_SendString("[SELF-TEST] KEY_SOS (P2.6) Pin Level: ");
Uart_SendByte((u8)(KEY_SOS ? '1' : '0'));
Uart_SendString("\r\n");
// 3. 检查 P1.3 电池电压检测与百分比
vbat_mv = ADC_GetBatteryVoltage_mV();
percent = ADC_GetBatteryPercent();