forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

wujiazhi
2024-06-13 72def895431ad7a08e635b11f3da738e2b2c4618
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __EX_RTC_H_
#define __EX_RTC_H_
 
#include "define_all.h" 
 
#define        RX8025_ADDR_READ                0x65
#define        RX8025_ADDR_WRITE               0x64
 
 
typedef struct 
{
    u8 hour;
    u8 min;
    u8 sec;                         //¹«ÀúÈÕÔÂÄêÖÜ    
    u8  month;
    u8  date;
    u8  week;
    u16 year;
}calendar_obj;     //BCD
 
typedef struct{
 
    uint8_t            yearN;
    uint8_t          monthN;
    uint8_t          dateN;
    uint8_t         hourN;
    uint8_t         minN;
    uint8_t         secN;
}NETTIME;                //BCD
 
 
extern calendar_obj   calendar;
extern NETTIME          net_now_time;
 
extern uint8_t Sending_flag;
 
extern uint8_t Last_Send_D,Last_Send_H,Last_Send_M;  //BCD
extern uint8_t Last_Sample_D,Last_Sample_H,Last_Sample_M; //BCD
extern uint8_t Next_real_Sample_D,Next_real_Sample_H,Next_real_Sample_M;
extern uint8_t Next_Sample_D,Next_Sample_H,Next_Sample_M; //????????
 
extern u8 RTC_cor;
extern u8 RTC_Setting_Flag;
 
/*************************************************************************************/
void  Time_Set(u16 year,u8 month,u8 date,u8 week,u8 hour,u8 min,u8 sec);
void  Get_Time(void);
void     set_RTC8025T_peroid_alarm();
 
void R8025T_read(u8 sadd, u8 *buf, u8 len);
void R8025T_write(u8 sadd,u8 *buf,u8 len);
 
#endif