remove list_date

This commit is contained in:
Meco Man 2021-05-08 23:51:47 +08:00
parent 43e9aec85e
commit 9de977a046
2 changed files with 6 additions and 21 deletions

View File

@ -3,21 +3,15 @@ from building import *
cwd = GetCurrentDir() cwd = GetCurrentDir()
src = [] src = []
rtc = ['rtc.c']
rtc_alarm = ['alarm.c']
soft_rtc = ['soft_rtc.c']
CPPPATH = [cwd + '/../include'] CPPPATH = [cwd + '/../include']
group = [] group = []
if GetDepend(['RT_USING_RTC']): if GetDepend(['RT_USING_RTC']):
src = src + rtc src = src + ['rtc.c']
if GetDepend(['RT_USING_ALARM']): if GetDepend(['RT_USING_ALARM']):
src = src + rtc_alarm src = src + ['alarm.c']
if GetDepend(['RT_USING_SOFT_RTC']): 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) group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_RTC'], CPPPATH = CPPPATH)

View File

@ -15,8 +15,11 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <rtthread.h> #include <rtthread.h>
#ifdef RT_USING_RTC #ifdef RT_USING_RTC
/** /**
* Set system date(time not modify, local timezone). * 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 #ifdef FINSH_USING_MSH
#include <finsh.h> #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] * 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"); 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]) MSH_CMD_EXPORT(date, get date and time or set (local timezone) [year month day hour min sec])
#endif /* FINSH_USING_MSH */ #endif /* FINSH_USING_MSH */