20260324
This commit is contained in:
76
RTX5_20220316/Driver/RTC/rtc.h
Normal file
76
RTX5_20220316/Driver/RTC/rtc.h
Normal file
@ -0,0 +1,76 @@
|
||||
#ifndef __RTC_H
|
||||
#define __RTC_H
|
||||
|
||||
#include "sys.h"
|
||||
#include "general_type.h"
|
||||
#include "stm32l1xx.h"
|
||||
#include "stm32l1xx_gpio.h"
|
||||
#include "stm32l1xx_rcc.h"
|
||||
#include "stm32l1xx_exti.h"
|
||||
#include "stm32l1xx_rtc.h"
|
||||
#include "stm32l1xx_pwr.h"
|
||||
#include "bsp.h"
|
||||
|
||||
//#define WKUP_KD PCin(13) //PC13 <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ⲿWK_UP<55><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define WKUP_KD GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_13)
|
||||
void RTC_NVIC_CONFIG(void);
|
||||
void RTC_Time_Init(void);
|
||||
void Sleep_Mode(void);
|
||||
void RtcWakeUpConfig(u32 temp);
|
||||
void MYRTC_Init(void);
|
||||
u8 Check_WKUP(void);
|
||||
void SetRTC(int set_year,int set_mon,int set_day,int set_hour,int set_min ,int set_sec) ;
|
||||
void Set_GNSSTIME_Rtc(void);
|
||||
void GetRTC(char *hhmmss,char *yymmdd);
|
||||
u32 RTC_GetSeconds(void);
|
||||
void RTC_AlarmAConfig(u32 seconds);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
void RTC_AlarmBConfig(int set_year,int set_mon,int set_day,int set_hour,int set_min ,int set_sec);
|
||||
u8 Is_Leap_Year(u16 year);
|
||||
u8 Key_Scan(void);
|
||||
void rtc_std_init(void);
|
||||
void RtcWakeUppin(void);
|
||||
void Measure_Ap_E(void);
|
||||
void Measure_Ap_S(void);
|
||||
typedef struct MYITStatu
|
||||
{
|
||||
unsigned char AlarmA_ITStatus :1;
|
||||
unsigned char AlarmB_ITStatus :1;
|
||||
unsigned char WUT_ITStatus :1;
|
||||
unsigned char WKUP1_ITStatus :1;
|
||||
unsigned char WKUP_POWBUTTON :1;
|
||||
unsigned char WKUP_MEA_WIFI :1;
|
||||
unsigned char WKUP_Test_WIFI :1;
|
||||
}MYITStatus_Struct; //<2F><><EFBFBD><EFBFBD><EFBFBD>жϵĽṹ<C4BD><E1B9B9>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
AlarmA_ITHP=1,
|
||||
AlarmB_ITHP=2,
|
||||
WUT_ITHP=3,
|
||||
WKUP1_ITHP=4,
|
||||
Power_ON=0,
|
||||
|
||||
}STB_ITStatus;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
KEY_CHECK = 0,
|
||||
KEY_COMFIRM = 1,
|
||||
KEY_RELEASE = 2,
|
||||
KEY_SHORT=3,
|
||||
KEY_LONG=4,
|
||||
}KEY_STATE; //<2F><><EFBFBD><EFBFBD>״̬
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NULL_KEY = 0,
|
||||
SHORT_KEY =1,
|
||||
LONG_KEY =2,
|
||||
}KEY_TYPE;//<2F><><EFBFBD><EFBFBD>ֵ
|
||||
|
||||
extern MYITStatus_Struct MYITStatus1;//<2F>жϵ<D0B6>״̬<D7B4><CCAC>ʾ
|
||||
extern u8 key_time;
|
||||
STB_ITStatus Get_Wkup_MYITstatus(void);
|
||||
#endif
|
||||
Reference in New Issue
Block a user