- 实现深睡眠模式下的功耗优化 - 添加PB8引脚的外部中断唤醒功能 - 新增Flash区域用于睡眠状态管理 - 实现睡眠配置的自动检查和恢复逻辑 同时重构了OTA_SET函数,改进了Flash配置参数的写入机制, 解决了GD32 Flash特性导致的0到1写入问题,并添加了详细的 调试信息输出和错误处理。
25 lines
447 B
C
25 lines
447 B
C
#ifndef _INITIAL_H
|
|
#define _INITIAL_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "gd32c10x_eval.h"
|
|
#include "stdint.h"
|
|
#include <stdio.h>
|
|
|
|
int fputc(int ch, FILE *f); // 声明fputc函数以重载标准库实现
|
|
|
|
u8 USART0_init(void);
|
|
u16 get_reset_cause(void);
|
|
void unused_pin_init();
|
|
void print_system_clock_info(void);
|
|
void enter_deep_sleep(void);
|
|
int check_sleep(void);
|
|
void EXTI5_9_IRQHandler(void);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |