9ceb218f80
Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
789 B
C
29 lines
789 B
C
#ifndef APP_RTC_H
|
|
#define APP_RTC_H
|
|
|
|
#ifdef __cplusplus /*C++编译环境下兼容C语言*/
|
|
extern "C" {
|
|
#endif
|
|
#include "main.h"
|
|
#include "publicdata/type.h"
|
|
|
|
/* 对外接口函数声明 */
|
|
void v_rtc_init(void);
|
|
|
|
/* app_rtc 兼容接口(对业务层使用 Comm_Time) */
|
|
void GetCurrentTime(Comm_Time *curTime);
|
|
void v_rtc_set_time(Comm_Time *curTime);
|
|
|
|
unsigned int xDate2Seconds(Comm_Time *time);
|
|
void xSeconds2Date(unsigned long seconds, Comm_Time *time);
|
|
U8_T u8_ocpp_timestamp_to_tm(Comm_Time *ctTime, const char *time_str, U8_T time_type);
|
|
void v_adjust_time_with_timezone(Comm_Time *ctTime, int hour_offset, int min_offset);
|
|
int CalculateTimeDiffInMinutes(const Comm_Time time1, const Comm_Time time2);
|
|
void test_rtc(void);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* APP_RTC_H */
|
|
|