Home
last modified time | relevance | path

Searched refs:rtc_current_time (Results 1 – 1 of 1) sorted by relevance

/bsp/gd32/arm/libraries/gd32_drivers/
A Ddrv_rtc.c51 rtc_parameter_struct rtc_current_time; in get_rtc_timestamp() local
53 rtc_current_time_get(&rtc_current_time); in get_rtc_timestamp()
55 tm_new.tm_year = bcd_to_bin(rtc_current_time.rtc_year) + 100; /* tm_year: years since 1900 */ in get_rtc_timestamp()
56 …tm_new.tm_mon = bcd_to_bin(rtc_current_time.rtc_month) - 1; /* tm_mon: month (0 = January, 11 = … in get_rtc_timestamp()
57 tm_new.tm_mday = bcd_to_bin(rtc_current_time.rtc_date); in get_rtc_timestamp()
58 tm_new.tm_hour = bcd_to_bin(rtc_current_time.rtc_hour); in get_rtc_timestamp()
59 tm_new.tm_min = bcd_to_bin(rtc_current_time.rtc_minute); in get_rtc_timestamp()
60 tm_new.tm_sec = bcd_to_bin(rtc_current_time.rtc_second); in get_rtc_timestamp()

Completed in 3 milliseconds