chen
2024-12-26 d517f3f5f4436f23839e344c3b2003e5eb6932e7
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
/*******************************************************************************
 * File Name         : Power.h
 * Description       :
 * Created on        : 2019Äê3ÔÂ22ÈÕ
 * Author            : www.hido-studio.com
 *******************************************************************************/
#ifndef _RTC_H_
#define _RTC_H_
/*******************************************************************************
 *                              Include Files                                  *
 *******************************************************************************/
#include "HIDO_Typedef.h"
 
/*******************************************************************************
 *                                  Macro                                      *
 *******************************************************************************/
 
/*******************************************************************************
 *                             Type Definition                                 *
 *******************************************************************************/
typedef struct
{
    HIDO_UINT16 m_u16Year;                                                      /* Äê */
    HIDO_UINT8 m_u8Month;                                                       /* Ô */
    HIDO_UINT8 m_u8Day;                                                         /* ÈÕ */
    HIDO_UINT8 m_u8Hour;                                                        /* Ê± */
    HIDO_UINT8 m_u8Min;                                                         /* ·Ö */
    HIDO_UINT8 m_u8Sec;                                                         /* Ãë */
} ST_RTCDateTime;
 
/*******************************************************************************
 *                             Global Function                                 *
 *******************************************************************************/
HIDO_VOID RTC_Init(void *_pRTC);
HIDO_VOID RTC_AddHours(ST_RTCDateTime *_pstDateTime, HIDO_UINT32 _u32Hours);
HIDO_INT32 RTC_GetDateTime(ST_RTCDateTime *_pstDateTime);
HIDO_INT32 RTC_SetDateTime(ST_RTCDateTime *_pstDateTime);
HIDO_UINT32 RTC_MakeTime(ST_RTCDateTime *_pstDateTime);
HIDO_UINT32 RTC_GetDiffSeconds(ST_RTCDateTime *_pstDateTime0, ST_RTCDateTime *_pstDateTime1);
HIDO_UINT32 RTC_GetSeconds(void);
HIDO_INT32 RTC_SetWakeUp(HIDO_UINT32 _u32Ms);
 
#endif /* _RTC_H_ */