remove list_date
This commit is contained in:
parent
43e9aec85e
commit
9de977a046
|
@ -3,21 +3,15 @@ from building import *
|
|||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
|
||||
rtc = ['rtc.c']
|
||||
|
||||
rtc_alarm = ['alarm.c']
|
||||
|
||||
soft_rtc = ['soft_rtc.c']
|
||||
|
||||
CPPPATH = [cwd + '/../include']
|
||||
group = []
|
||||
|
||||
if GetDepend(['RT_USING_RTC']):
|
||||
src = src + rtc
|
||||
src = src + ['rtc.c']
|
||||
if GetDepend(['RT_USING_ALARM']):
|
||||
src = src + rtc_alarm
|
||||
src = src + ['alarm.c']
|
||||
if GetDepend(['RT_USING_SOFT_RTC']):
|
||||
src = src + soft_rtc
|
||||
src = src + ['soft_rtc.c']
|
||||
|
||||
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_RTC'], CPPPATH = CPPPATH)
|
||||
|
||||
|
|
|
@ -15,8 +15,11 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifdef RT_USING_RTC
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set system date(time not modify, local timezone).
|
||||
*
|
||||
|
@ -119,17 +122,6 @@ rt_err_t set_time(rt_uint32_t hour, rt_uint32_t minute, rt_uint32_t second)
|
|||
|
||||
#ifdef FINSH_USING_MSH
|
||||
#include <finsh.h>
|
||||
/**
|
||||
* show date and time (local timezone)
|
||||
*/
|
||||
void list_date(void)
|
||||
{
|
||||
time_t now;
|
||||
|
||||
now = time(RT_NULL);
|
||||
rt_kprintf("%.*s\n", 25, ctime(&now));
|
||||
}
|
||||
|
||||
/**
|
||||
* get date and time or set (local timezone) [year month day hour min sec]
|
||||
*/
|
||||
|
@ -192,7 +184,6 @@ static void date(uint8_t argc, char **argv)
|
|||
rt_kprintf("e.g: date 2018 01 01 23 59 59 or date\n");
|
||||
}
|
||||
}
|
||||
MSH_CMD_EXPORT(list_date, show date and time (local timezone))
|
||||
MSH_CMD_EXPORT(date, get date and time or set (local timezone) [year month day hour min sec])
|
||||
#endif /* FINSH_USING_MSH */
|
||||
|
||||
|
|
Loading…
Reference in New Issue