Skip to content

Commit 21b0cd1

Browse files
committed
优化 RTC_TIME_INIT 格式
1 parent bc97852 commit 21b0cd1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

components/drivers/rtc/dev_soft_rtc.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@
2020
#ifdef RT_USING_SOFT_RTC
2121

2222
/* 2018-01-30 14:44:50 = RTC_TIME_INIT(2018, 1, 30, 14, 44, 50) */
23-
#define RTC_TIME_INIT(year, month, day, hour, minute, second) \
24-
{ \
25-
.tm_year = year - 1900, .tm_mon = month - 1, .tm_mday = day, .tm_hour = hour, .tm_min = minute, .tm_sec = second \
23+
#define RTC_TIME_INIT(year, month, day, hour, minute, second) \
24+
{ \
25+
.tm_year = year - 1900, \
26+
.tm_mon = month - 1, \
27+
.tm_mday = day, \
28+
.tm_hour = hour, \
29+
.tm_min = minute, \
30+
.tm_sec = second, \
2631
}
2732

2833
#ifndef SOFT_RTC_TIME_DEFAULT

0 commit comments

Comments
 (0)