Add support for lo- and hi-res RTC hardware

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4005 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-10-01 22:09:00 +00:00
parent b83c820523
commit 3f4af2fe30
13 changed files with 750 additions and 307 deletions
+1
View File
@@ -268,6 +268,7 @@ CONFIG_WIRELESS=y
#
CONFIG_RTC=y
CONFIG_RTC_HIRES=y
CONFIG_RTC_FREQUENCY=16384
CONFIG_SYSTEM_UTC=y
#
+2 -3
View File
@@ -714,9 +714,8 @@ int sif_main(int argc, char *argv[])
struct timespec t_active;
clock_gettime(CLOCK_ACTIVETIME, &t_active);
fprintf(stderr, "rtc time = %u / %u, active = %u / %u, time / systick = %u / %u\n",
up_rtc_gettime(), up_rtc_getclock(),
t_active.tv_sec, t_active.tv_nsec,
fprintf(stderr, "rtc time = %u, active = %u / %u, time / systick = %u / %u\n",
up_rtc_time(), t_active.tv_sec, t_active.tv_nsec,
time(NULL), clock_systimer() );
return -1;
}