期末大作业-增加了显示时间、设置时间的功能,已基本完成功能。

设置时间的功能使用Cursor生成。

为了减少误差,专门调整了时钟周期。
This commit is contained in:
2025-01-07 21:01:38 +08:00
parent 324328bd25
commit 2fb33e955c
7 changed files with 1470 additions and 28 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,8 @@ typedef struct {
uint8_t bTenMilSecOk; // 10毫秒标志位
uint8_t mTimeCount; // 秒计数
uint8_t bTimeOk; // 秒标志位
uint8_t mHundredMilSecCount; // 百微秒计数
uint8_t bHundredMilSecOk; // 百微秒标志位
} stSysTickTimer;
typedef struct {
@@ -23,6 +25,16 @@ typedef struct {
uint8_t bTenMilIsOk;
} structTime;
typedef enum {
SET_HOUR_TENS, // 小时十位
SET_HOUR_ONES, // 小时个位
SET_MIN_TENS, // 分钟十位
SET_MIN_ONES, // 分钟个位
SET_SEC_TENS, // 秒十位
SET_SEC_ONES, // 秒个位
SET_DONE // 设置完成
} TIME_STATE;
#ifdef __cplusplus
}
#endif