mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-07 18:34:33 +08:00
[DeviceDriver][RTC] Add soft RTC and NTP auto sync time config to Kconfig.
This commit is contained in:
parent
59be76af25
commit
cd23728070
@ -78,6 +78,25 @@ config RT_USING_RTC
|
|||||||
bool "Using RTC device drivers"
|
bool "Using RTC device drivers"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
if RT_USING_RTC
|
||||||
|
config RT_USING_SOFT_RTC
|
||||||
|
bool "Using software simulation RTC device"
|
||||||
|
default n
|
||||||
|
config RTC_SYNC_USING_NTP
|
||||||
|
bool "Using NTP auto sync RTC time"
|
||||||
|
select PKG_NETUTILS_NTP
|
||||||
|
default n
|
||||||
|
|
||||||
|
if RTC_SYNC_USING_NTP
|
||||||
|
config RTC_NTP_FIRST_SYNC_DELAY
|
||||||
|
int "NTP first sync delay time(second) for network connect"
|
||||||
|
default 30
|
||||||
|
config RTC_NTP_SYNC_PERIOD
|
||||||
|
int "NTP auto sync period(second)"
|
||||||
|
default 3600
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
config RT_USING_SDIO
|
config RT_USING_SDIO
|
||||||
bool "Using SD/MMC device drivers"
|
bool "Using SD/MMC device drivers"
|
||||||
default n
|
default n
|
||||||
|
@ -22,15 +22,13 @@
|
|||||||
* 2012-10-10 aozima first version.
|
* 2012-10-10 aozima first version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RTC_H_INCLUDED
|
#ifndef __RTC_H__
|
||||||
#define RTC_H_INCLUDED
|
#define __RTC_H__
|
||||||
|
|
||||||
extern rt_err_t set_date(rt_uint32_t year,
|
rt_err_t set_date(rt_uint32_t year, rt_uint32_t month, rt_uint32_t day);
|
||||||
rt_uint32_t month,
|
rt_err_t set_time(rt_uint32_t hour, rt_uint32_t minute, rt_uint32_t second);
|
||||||
rt_uint32_t day);
|
|
||||||
|
|
||||||
extern rt_err_t set_time(rt_uint32_t hour,
|
int rt_soft_rtc_init(void);
|
||||||
rt_uint32_t minute,
|
int rt_rtc_ntp_sync_init(void);
|
||||||
rt_uint32_t second);
|
|
||||||
|
|
||||||
#endif // RTC_H_INCLUDED
|
#endif /* __RTC_H__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user