// // Created by EDZ on 25-9-16. // #ifndef RTC_SLEEP_H #define RTC_SLEEP_H #include #include #include "string.h" #include "E52.h" #include "E104-BT5005A.h" // 定义结构体一个结构体用于存储读取到的日期时间 typedef struct { uint8_t hours; uint8_t minutes; uint8_t seconds; uint8_t weekday; uint8_t month; uint8_t date; uint8_t year; } RTC_DateTimeTypeDef; typedef struct { uint8_t SOS_key_Duration; uint8_t SOS_key_Count; uint8_t sosCheckActive;// 标志位,表示正在检测中 } RTC_SOS_key_struct; extern RTC_DateTimeTypeDef firstPressTime; extern RTC_SOS_key_struct SOS_key_struct; extern uint8_t RTC_Sleep_Flag; void RTC_GetDateTime(RTC_HandleTypeDef *hrtc, RTC_DateTimeTypeDef *datetime); void RTC_SetDateTime(RTC_HandleTypeDef *hrtc, uint8_t hours, uint8_t minutes, uint8_t seconds, uint8_t weekday, uint8_t month, uint8_t date, uint8_t year); void RTC_Sleep_Enter_Fun(void); #endif //RTC_SLEEP_H