2012-09-29 08:14:29 +08:00
|
|
|
/*
|
2023-04-18 10:26:23 +08:00
|
|
|
* Copyright (c) 2006-2023, RT-Thread Development Team
|
2012-09-29 08:14:29 +08:00
|
|
|
*
|
2018-10-14 19:37:18 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2012-09-29 08:14:29 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2012-01-29 aozima first version.
|
|
|
|
* 2012-04-12 aozima optimization: find rtc device only first.
|
|
|
|
* 2012-04-16 aozima add scheduler lock for set_date and set_time.
|
2018-02-16 12:58:48 +08:00
|
|
|
* 2018-02-16 armink add auto sync time by NTP
|
2021-05-09 15:59:27 +08:00
|
|
|
* 2021-05-09 Meco Man remove NTP
|
2021-07-30 03:55:18 +08:00
|
|
|
* 2021-06-11 iysheng implement RTC framework V2.0
|
|
|
|
* 2021-07-30 Meco Man move rtc_core.c to rtc.c
|
2012-09-29 08:14:29 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string.h>
|
2021-05-04 13:06:24 +08:00
|
|
|
#include <stdlib.h>
|
2012-09-29 08:14:29 +08:00
|
|
|
#include <rtthread.h>
|
2024-08-24 06:15:09 +08:00
|
|
|
#include <drivers/dev_rtc.h>
|
2012-09-29 08:14:29 +08:00
|
|
|
|
2018-05-07 18:19:15 +08:00
|
|
|
#ifdef RT_USING_RTC
|
|
|
|
|
2022-04-04 23:26:35 +08:00
|
|
|
static rt_device_t _rtc_device;
|
2021-07-30 02:42:57 +08:00
|
|
|
/*
|
|
|
|
* This function initializes rtc_core
|
|
|
|
*/
|
2021-07-30 03:55:18 +08:00
|
|
|
static rt_err_t rt_rtc_init(struct rt_device *dev)
|
2021-07-30 02:42:57 +08:00
|
|
|
{
|
|
|
|
rt_rtc_dev_t *rtc_core;
|
|
|
|
|
|
|
|
RT_ASSERT(dev != RT_NULL);
|
|
|
|
rtc_core = (rt_rtc_dev_t *)dev;
|
|
|
|
if (rtc_core->ops->init)
|
|
|
|
{
|
|
|
|
return (rtc_core->ops->init());
|
|
|
|
}
|
|
|
|
|
2021-07-30 03:55:18 +08:00
|
|
|
return -RT_ENOSYS;
|
2021-07-30 02:42:57 +08:00
|
|
|
}
|
|
|
|
|
2021-07-30 03:55:18 +08:00
|
|
|
static rt_err_t rt_rtc_open(struct rt_device *dev, rt_uint16_t oflag)
|
2021-07-30 02:42:57 +08:00
|
|
|
{
|
2021-07-30 03:55:18 +08:00
|
|
|
return RT_EOK;
|
2021-07-30 02:42:57 +08:00
|
|
|
}
|
|
|
|
|
2021-07-30 03:55:18 +08:00
|
|
|
static rt_err_t rt_rtc_close(struct rt_device *dev)
|
2021-07-30 02:42:57 +08:00
|
|
|
{
|
|
|
|
/* Add close member function in rt_rtc_ops when need,
|
|
|
|
* then call that function here.
|
|
|
|
* */
|
2021-07-30 03:55:18 +08:00
|
|
|
return RT_EOK;
|
2021-07-30 02:42:57 +08:00
|
|
|
}
|
|
|
|
|
2021-07-30 03:55:18 +08:00
|
|
|
static rt_err_t rt_rtc_control(struct rt_device *dev, int cmd, void *args)
|
2021-07-30 02:42:57 +08:00
|
|
|
{
|
2021-07-30 03:55:18 +08:00
|
|
|
#define TRY_DO_RTC_FUNC(rt_rtc_dev, func_name, args) \
|
|
|
|
rt_rtc_dev->ops->func_name ? rt_rtc_dev->ops->func_name(args) : -RT_EINVAL;
|
|
|
|
|
|
|
|
rt_rtc_dev_t *rtc_device;
|
2021-07-30 02:42:57 +08:00
|
|
|
rt_err_t ret = -RT_EINVAL;
|
|
|
|
|
|
|
|
RT_ASSERT(dev != RT_NULL);
|
2021-07-30 03:55:18 +08:00
|
|
|
rtc_device = (rt_rtc_dev_t *)dev;
|
2021-07-30 02:42:57 +08:00
|
|
|
|
|
|
|
switch (cmd)
|
|
|
|
{
|
|
|
|
case RT_DEVICE_CTRL_RTC_GET_TIME:
|
2021-07-30 03:55:18 +08:00
|
|
|
ret = TRY_DO_RTC_FUNC(rtc_device, get_secs, args);
|
2021-07-30 02:42:57 +08:00
|
|
|
break;
|
|
|
|
case RT_DEVICE_CTRL_RTC_SET_TIME:
|
2021-07-30 03:55:18 +08:00
|
|
|
ret = TRY_DO_RTC_FUNC(rtc_device, set_secs, args);
|
2021-07-30 02:42:57 +08:00
|
|
|
break;
|
2021-09-29 17:52:10 +08:00
|
|
|
case RT_DEVICE_CTRL_RTC_GET_TIMEVAL:
|
|
|
|
ret = TRY_DO_RTC_FUNC(rtc_device, get_timeval, args);
|
2021-07-30 02:42:57 +08:00
|
|
|
break;
|
2021-09-29 17:52:10 +08:00
|
|
|
case RT_DEVICE_CTRL_RTC_SET_TIMEVAL:
|
|
|
|
ret = TRY_DO_RTC_FUNC(rtc_device, set_timeval, args);
|
2021-07-30 02:42:57 +08:00
|
|
|
break;
|
|
|
|
case RT_DEVICE_CTRL_RTC_GET_ALARM:
|
2021-07-30 03:55:18 +08:00
|
|
|
ret = TRY_DO_RTC_FUNC(rtc_device, get_alarm, args);
|
2021-07-30 02:42:57 +08:00
|
|
|
break;
|
|
|
|
case RT_DEVICE_CTRL_RTC_SET_ALARM:
|
2021-07-30 03:55:18 +08:00
|
|
|
ret = TRY_DO_RTC_FUNC(rtc_device, set_alarm, args);
|
2021-07-30 02:42:57 +08:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2021-07-30 03:55:18 +08:00
|
|
|
|
|
|
|
#undef TRY_DO_RTC_FUNC
|
2021-07-30 02:42:57 +08:00
|
|
|
}
|
2021-07-30 03:55:18 +08:00
|
|
|
|
2021-07-30 02:42:57 +08:00
|
|
|
#ifdef RT_USING_DEVICE_OPS
|
|
|
|
const static struct rt_device_ops rtc_core_ops =
|
|
|
|
{
|
2021-07-30 03:55:18 +08:00
|
|
|
rt_rtc_init,
|
|
|
|
rt_rtc_open,
|
|
|
|
rt_rtc_close,
|
2021-07-30 02:42:57 +08:00
|
|
|
RT_NULL,
|
|
|
|
RT_NULL,
|
2021-07-30 03:55:18 +08:00
|
|
|
rt_rtc_control,
|
2021-07-30 02:42:57 +08:00
|
|
|
};
|
2021-07-30 03:55:18 +08:00
|
|
|
#endif /* RT_USING_DEVICE_OPS */
|
2021-07-30 02:42:57 +08:00
|
|
|
|
2021-07-30 03:55:18 +08:00
|
|
|
rt_err_t rt_hw_rtc_register(rt_rtc_dev_t *rtc,
|
2021-07-30 02:42:57 +08:00
|
|
|
const char *name,
|
|
|
|
rt_uint32_t flag,
|
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
struct rt_device *device;
|
|
|
|
RT_ASSERT(rtc != RT_NULL);
|
|
|
|
|
|
|
|
device = &(rtc->parent);
|
|
|
|
|
|
|
|
device->type = RT_Device_Class_RTC;
|
|
|
|
device->rx_indicate = RT_NULL;
|
|
|
|
device->tx_complete = RT_NULL;
|
|
|
|
|
|
|
|
#ifdef RT_USING_DEVICE_OPS
|
|
|
|
device->ops = &rtc_core_ops;
|
|
|
|
#else
|
2021-07-30 03:55:18 +08:00
|
|
|
device->init = rt_rtc_init;
|
|
|
|
device->open = rt_rtc_open;
|
|
|
|
device->close = rt_rtc_close;
|
2021-07-30 02:42:57 +08:00
|
|
|
device->read = RT_NULL;
|
|
|
|
device->write = RT_NULL;
|
2021-07-30 03:55:18 +08:00
|
|
|
device->control = rt_rtc_control;
|
|
|
|
#endif /* RT_USING_DEVICE_OPS */
|
2021-07-30 02:42:57 +08:00
|
|
|
device->user_data = data;
|
|
|
|
|
|
|
|
/* register a character device */
|
|
|
|
return rt_device_register(device, name, flag);
|
|
|
|
}
|
|
|
|
|
2018-02-16 12:58:48 +08:00
|
|
|
/**
|
2021-02-05 13:13:22 +08:00
|
|
|
* Set system date(time not modify, local timezone).
|
2012-09-29 08:14:29 +08:00
|
|
|
*
|
2018-02-16 12:58:48 +08:00
|
|
|
* @param rt_uint32_t year e.g: 2012.
|
|
|
|
* @param rt_uint32_t month e.g: 12 (1~12).
|
|
|
|
* @param rt_uint32_t day e.g: 31.
|
|
|
|
*
|
|
|
|
* @return rt_err_t if set success, return RT_EOK.
|
2012-09-29 08:14:29 +08:00
|
|
|
*/
|
|
|
|
rt_err_t set_date(rt_uint32_t year, rt_uint32_t month, rt_uint32_t day)
|
|
|
|
{
|
2022-04-04 23:26:35 +08:00
|
|
|
time_t now, old_timestamp = 0;
|
|
|
|
struct tm tm_new = {0};
|
2012-09-29 08:14:29 +08:00
|
|
|
rt_err_t ret = -RT_ERROR;
|
|
|
|
|
2022-04-04 23:26:35 +08:00
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
_rtc_device = rt_device_find("rtc");
|
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
return -RT_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-29 08:14:29 +08:00
|
|
|
/* get current time */
|
2022-04-04 23:26:35 +08:00
|
|
|
ret = rt_device_control(_rtc_device, RT_DEVICE_CTRL_RTC_GET_TIME, &old_timestamp);
|
|
|
|
if (ret != RT_EOK)
|
|
|
|
{
|
|
|
|
return ret;
|
|
|
|
}
|
2012-09-29 08:14:29 +08:00
|
|
|
|
2021-02-05 13:13:22 +08:00
|
|
|
/* converts calendar time into local time. */
|
2022-04-04 23:26:35 +08:00
|
|
|
localtime_r(&old_timestamp, &tm_new);
|
2012-09-29 08:14:29 +08:00
|
|
|
|
|
|
|
/* update date. */
|
|
|
|
tm_new.tm_year = year - 1900;
|
|
|
|
tm_new.tm_mon = month - 1; /* tm_mon: 0~11 */
|
|
|
|
tm_new.tm_mday = day;
|
|
|
|
|
2021-02-05 18:55:39 +08:00
|
|
|
/* converts the local time into the calendar time. */
|
2012-09-29 08:14:29 +08:00
|
|
|
now = mktime(&tm_new);
|
|
|
|
|
|
|
|
/* update to RTC device. */
|
2022-04-04 23:26:35 +08:00
|
|
|
ret = rt_device_control(_rtc_device, RT_DEVICE_CTRL_RTC_SET_TIME, &now);
|
2012-09-29 08:14:29 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2018-02-16 12:58:48 +08:00
|
|
|
/**
|
2021-02-05 13:13:22 +08:00
|
|
|
* Set system time(date not modify, local timezone).
|
2018-02-16 12:58:48 +08:00
|
|
|
*
|
|
|
|
* @param rt_uint32_t hour e.g: 0~23.
|
|
|
|
* @param rt_uint32_t minute e.g: 0~59.
|
|
|
|
* @param rt_uint32_t second e.g: 0~59.
|
2012-09-29 08:14:29 +08:00
|
|
|
*
|
2018-02-16 12:58:48 +08:00
|
|
|
* @return rt_err_t if set success, return RT_EOK.
|
2012-09-29 08:14:29 +08:00
|
|
|
*/
|
|
|
|
rt_err_t set_time(rt_uint32_t hour, rt_uint32_t minute, rt_uint32_t second)
|
|
|
|
{
|
2022-04-04 23:26:35 +08:00
|
|
|
time_t now, old_timestamp = 0;
|
|
|
|
struct tm tm_new = {0};
|
2012-09-29 08:14:29 +08:00
|
|
|
rt_err_t ret = -RT_ERROR;
|
|
|
|
|
2022-04-04 23:26:35 +08:00
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
_rtc_device = rt_device_find("rtc");
|
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
return -RT_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-29 08:14:29 +08:00
|
|
|
/* get current time */
|
2022-04-04 23:26:35 +08:00
|
|
|
ret = rt_device_control(_rtc_device, RT_DEVICE_CTRL_RTC_GET_TIME, &old_timestamp);
|
|
|
|
if (ret != RT_EOK)
|
|
|
|
{
|
|
|
|
return ret;
|
|
|
|
}
|
2012-09-29 08:14:29 +08:00
|
|
|
|
2021-02-05 13:13:22 +08:00
|
|
|
/* converts calendar time into local time. */
|
2022-04-04 23:26:35 +08:00
|
|
|
localtime_r(&old_timestamp, &tm_new);
|
2012-09-29 08:14:29 +08:00
|
|
|
|
|
|
|
/* update time. */
|
|
|
|
tm_new.tm_hour = hour;
|
|
|
|
tm_new.tm_min = minute;
|
|
|
|
tm_new.tm_sec = second;
|
|
|
|
|
2021-02-05 13:13:22 +08:00
|
|
|
/* converts the local time into the calendar time. */
|
2012-09-29 08:14:29 +08:00
|
|
|
now = mktime(&tm_new);
|
|
|
|
|
|
|
|
/* update to RTC device. */
|
2022-04-04 23:26:35 +08:00
|
|
|
ret = rt_device_control(_rtc_device, RT_DEVICE_CTRL_RTC_SET_TIME, &now);
|
2012-09-29 08:14:29 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2022-04-04 23:41:13 +08:00
|
|
|
/**
|
2022-04-05 16:45:22 +08:00
|
|
|
* Set timestamp(UTC).
|
2022-04-04 23:41:13 +08:00
|
|
|
*
|
|
|
|
* @param time_t timestamp
|
|
|
|
*
|
|
|
|
* @return rt_err_t if set success, return RT_EOK.
|
|
|
|
*/
|
|
|
|
rt_err_t set_timestamp(time_t timestamp)
|
|
|
|
{
|
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
_rtc_device = rt_device_find("rtc");
|
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
return -RT_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* update to RTC device. */
|
|
|
|
return rt_device_control(_rtc_device, RT_DEVICE_CTRL_RTC_SET_TIME, ×tamp);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-04-05 16:45:22 +08:00
|
|
|
* Get timestamp(UTC).
|
2022-04-04 23:41:13 +08:00
|
|
|
*
|
|
|
|
* @param time_t* timestamp
|
|
|
|
*
|
|
|
|
* @return rt_err_t if set success, return RT_EOK.
|
|
|
|
*/
|
|
|
|
rt_err_t get_timestamp(time_t *timestamp)
|
|
|
|
{
|
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
_rtc_device = rt_device_find("rtc");
|
|
|
|
if (_rtc_device == RT_NULL)
|
|
|
|
{
|
|
|
|
return -RT_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get timestamp from RTC device. */
|
|
|
|
return rt_device_control(_rtc_device, RT_DEVICE_CTRL_RTC_GET_TIME, timestamp);
|
|
|
|
}
|
2022-04-04 23:26:35 +08:00
|
|
|
|
2021-08-23 17:30:05 +08:00
|
|
|
#ifdef RT_USING_FINSH
|
2012-09-29 08:14:29 +08:00
|
|
|
#include <finsh.h>
|
2021-02-05 13:13:22 +08:00
|
|
|
/**
|
|
|
|
* get date and time or set (local timezone) [year month day hour min sec]
|
|
|
|
*/
|
2021-09-11 11:07:51 +08:00
|
|
|
static void date(int argc, char **argv)
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
2022-04-05 00:44:26 +08:00
|
|
|
time_t now = (time_t)0;
|
|
|
|
|
2018-02-16 13:03:56 +08:00
|
|
|
if (argc == 1)
|
|
|
|
{
|
2022-04-05 00:44:26 +08:00
|
|
|
struct timeval tv = { 0 };
|
2023-08-13 01:29:26 +08:00
|
|
|
int32_t tz_offset_sec = 0;
|
|
|
|
uint32_t abs_tz_offset_sec = 0U;
|
2022-04-05 00:44:26 +08:00
|
|
|
|
2023-08-13 01:29:26 +08:00
|
|
|
#if defined(RT_LIBC_USING_LIGHT_TZ_DST)
|
|
|
|
tz_offset_sec = rt_tz_get();
|
|
|
|
#endif /* RT_LIBC_USING_LIGHT_TZ_DST */
|
|
|
|
|
|
|
|
gettimeofday(&tv, RT_NULL);
|
2022-04-05 00:44:26 +08:00
|
|
|
now = tv.tv_sec;
|
2023-08-13 01:29:26 +08:00
|
|
|
|
|
|
|
abs_tz_offset_sec = tz_offset_sec > 0 ? tz_offset_sec : -tz_offset_sec;
|
2018-02-16 13:03:56 +08:00
|
|
|
/* output current time */
|
2023-08-13 01:29:26 +08:00
|
|
|
rt_kprintf("local time: %.*s", 25U, ctime(&now));
|
2022-04-17 10:49:10 +08:00
|
|
|
rt_kprintf("timestamps: %ld\n", (long)tv.tv_sec);
|
2023-08-13 01:29:26 +08:00
|
|
|
rt_kprintf("timezone: UTC%c%02d:%02d:%02d\n",
|
|
|
|
tz_offset_sec > 0 ? '+' : '-', abs_tz_offset_sec / 3600U, abs_tz_offset_sec % 3600U / 60U, abs_tz_offset_sec % 3600U % 60U);
|
2018-02-16 13:03:56 +08:00
|
|
|
}
|
|
|
|
else if (argc >= 7)
|
|
|
|
{
|
|
|
|
/* set time and date */
|
2022-04-05 00:44:26 +08:00
|
|
|
struct tm tm_new = {0};
|
|
|
|
time_t old = (time_t)0;
|
|
|
|
rt_err_t err;
|
|
|
|
|
|
|
|
tm_new.tm_year = atoi(argv[1]) - 1900;
|
2022-04-17 10:49:10 +08:00
|
|
|
tm_new.tm_mon = atoi(argv[2]) - 1; /* .tm_min's range is [0-11] */
|
2022-04-05 00:44:26 +08:00
|
|
|
tm_new.tm_mday = atoi(argv[3]);
|
|
|
|
tm_new.tm_hour = atoi(argv[4]);
|
|
|
|
tm_new.tm_min = atoi(argv[5]);
|
|
|
|
tm_new.tm_sec = atoi(argv[6]);
|
2022-04-17 10:49:10 +08:00
|
|
|
if (tm_new.tm_year <= 0)
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
2022-04-17 10:49:10 +08:00
|
|
|
rt_kprintf("year is out of range [1900-]\n");
|
2018-02-16 13:03:56 +08:00
|
|
|
return;
|
|
|
|
}
|
2022-04-17 10:49:10 +08:00
|
|
|
if (tm_new.tm_mon > 11) /* .tm_min's range is [0-11] */
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
|
|
|
rt_kprintf("month is out of range [1-12]\n");
|
|
|
|
return;
|
|
|
|
}
|
2022-04-05 00:44:26 +08:00
|
|
|
if (tm_new.tm_mday == 0 || tm_new.tm_mday > 31)
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
|
|
|
rt_kprintf("day is out of range [1-31]\n");
|
|
|
|
return;
|
|
|
|
}
|
2022-04-05 00:44:26 +08:00
|
|
|
if (tm_new.tm_hour > 23)
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
|
|
|
rt_kprintf("hour is out of range [0-23]\n");
|
|
|
|
return;
|
|
|
|
}
|
2022-04-05 00:44:26 +08:00
|
|
|
if (tm_new.tm_min > 59)
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
|
|
|
rt_kprintf("minute is out of range [0-59]\n");
|
|
|
|
return;
|
|
|
|
}
|
2022-04-17 10:49:10 +08:00
|
|
|
if (tm_new.tm_sec > 60)
|
2018-02-16 13:03:56 +08:00
|
|
|
{
|
2022-04-17 10:49:10 +08:00
|
|
|
rt_kprintf("second is out of range [0-60]\n");
|
2018-02-16 13:03:56 +08:00
|
|
|
return;
|
|
|
|
}
|
2022-04-05 00:44:26 +08:00
|
|
|
/* save old timestamp */
|
|
|
|
err = get_timestamp(&old);
|
|
|
|
if (err != RT_EOK)
|
|
|
|
{
|
|
|
|
rt_kprintf("Get current timestamp failed. %d\n", err);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* converts the local time into the calendar time. */
|
|
|
|
now = mktime(&tm_new);
|
|
|
|
err = set_timestamp(now);
|
|
|
|
if (err != RT_EOK)
|
|
|
|
{
|
|
|
|
rt_kprintf("set date failed. %d\n", err);
|
|
|
|
return;
|
|
|
|
}
|
2022-04-17 10:49:10 +08:00
|
|
|
get_timestamp(&now); /* get new timestamp */
|
2022-04-05 00:44:26 +08:00
|
|
|
rt_kprintf("old: %.*s", 25, ctime(&old));
|
|
|
|
rt_kprintf("now: %.*s", 25, ctime(&now));
|
2018-02-16 13:03:56 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rt_kprintf("please input: date [year month day hour min sec] or date\n");
|
|
|
|
rt_kprintf("e.g: date 2018 01 01 23 59 59 or date\n");
|
|
|
|
}
|
|
|
|
}
|
2021-02-05 13:13:22 +08:00
|
|
|
MSH_CMD_EXPORT(date, get date and time or set (local timezone) [year month day hour min sec])
|
2021-08-23 17:30:05 +08:00
|
|
|
#endif /* RT_USING_FINSH */
|
2018-02-16 13:03:56 +08:00
|
|
|
|
2018-05-07 18:19:15 +08:00
|
|
|
#endif /* RT_USING_RTC */
|