summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog2
-rw-r--r--nuttx/Documentation/NuttX.html7
-rw-r--r--nuttx/include/nuttx/clock.h12
-rw-r--r--nuttx/lib/time/lib_time.c2
-rw-r--r--nuttx/sched/Makefile4
-rw-r--r--nuttx/sched/clock_getutc.c (renamed from nuttx/sched/clock_uptime.c)12
-rw-r--r--nuttx/sched/clock_initialize.c28
7 files changed, 35 insertions, 32 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 70496acbe..2a8475d57 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -1693,7 +1693,7 @@
character in the string.
* tools/version.sh and mkversion.c: Tools to manage a NuttX version number
file
- * sched/clock_uptime() and lib/time/lib_time.c: Add support for 1 second uptime
+ * sched/clock_getutc() and lib/time/lib_time.c: Add support for 1 second UTC
interface.
* net/net_dup2.c and include/nuttx/net.h: The conditional compilation for
'#if CONFIG_NFILE_DESCRIPTOR > 0' was wrong in both of these files. It should
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 5c5e2ff88..ce7d9e6bc 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
- <p>Last Updated: April 18, 2011</p>
+ <p>Last Updated: April 20, 2011</p>
</td>
</tr>
</table>
@@ -2226,7 +2226,7 @@ nuttx-6.2 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
character in the string.
* tools/version.sh and mkversion.c: Tools to manage a NuttX version number
file
- * sched/clock_uptime() and lib/time/lib_time.c: Add support for 1 second uptime
+ * sched/clock_getutc() and lib/time/lib_time.c: Add support for 1 second UTC
interface.
* net/net_dup2.c and include/nuttx/net.h: The conditional compilation for
'#if CONFIG_NFILE_DESCRIPTOR > 0' was wrong in both of these files. It should
@@ -2238,6 +2238,9 @@ nuttx-6.2 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
OLED with Solomon Systech SD1305 LCD controller.
* configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO
board.
+ * graphics/nxglib/nxglib_nonintersecting.c: Fix some single bit errors in
+ calculation of non-intersecting regions. This was causing an anomoaly
+ in examples/nx in column 0.
apps-6.1 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
diff --git a/nuttx/include/nuttx/clock.h b/nuttx/include/nuttx/clock.h
index 62bc29910..cde1dd2db 100644
--- a/nuttx/include/nuttx/clock.h
+++ b/nuttx/include/nuttx/clock.h
@@ -127,14 +127,14 @@
#if __HAVE_KERNEL_GLOBALS
extern volatile uint32_t g_system_timer;
-extern volatile uint32_t g_uptime;
+extern volatile uint32_t g_system_utc;
#endif
#if !defined(CONFIG_RTC) && __HAVE_KERNEL_GLOBALS
#define clock_systimer() g_system_timer
-#if defined(CONFIG_UPTIME)
-#define clock_uptime() g_uptime
+#if defined(CONFIG_SYSTEM_UTC)
+#define clock_getutc() g_system_utc
#endif
#endif
@@ -174,7 +174,7 @@ EXTERN uint32_t clock_systimer(void);
#endif
/****************************************************************************
- * Function: clock_uptime
+ * Function: clock_getutc
*
* Description:
* Return the current value of the system timer counter, which is only
@@ -190,8 +190,8 @@ EXTERN uint32_t clock_systimer(void);
*
****************************************************************************/
-#if defined(CONFIG_UPTIME) && !__HAVE_KERNEL_GLOBALS
-EXTERN time_t clock_uptime(void);
+#if defined(CONFIG_SYSTEM_UTC) && !__HAVE_KERNEL_GLOBALS
+EXTERN time_t clock_getutc(void);
#endif
#undef EXTERN
diff --git a/nuttx/lib/time/lib_time.c b/nuttx/lib/time/lib_time.c
index 6900791a7..0ddd7993f 100644
--- a/nuttx/lib/time/lib_time.c
+++ b/nuttx/lib/time/lib_time.c
@@ -89,7 +89,7 @@ time_t time(time_t *tloc)
struct timeval tp;
int ret;
- /* Get the current uptime from the system */
+ /* Get the current time from the system */
ret = gettimeofday(&tp, NULL);
if (ret == OK)
diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile
index bc2852c54..2ad17f826 100644
--- a/nuttx/sched/Makefile
+++ b/nuttx/sched/Makefile
@@ -80,8 +80,8 @@ CLOCK_SRCS = clock_initialize.c clock_settime.c clock_gettime.c clock_getres.c \
clock_time2ticks.c clock_abstime2ticks.c clock_ticks2time.c \
clock_gettimeofday.c clock_systimer.c
-ifeq ($(CONFIG_UPTIME),y)
-CLOCK_SRCS += clock_uptime.c
+ifeq ($(CONFIG_SYSTEM_UTC),y)
+CLOCK_SRCS += clock_getutc.c
endif
SIGNAL_SRCS = sig_initialize.c \
diff --git a/nuttx/sched/clock_uptime.c b/nuttx/sched/clock_getutc.c
index 203d056fd..95c097019 100644
--- a/nuttx/sched/clock_uptime.c
+++ b/nuttx/sched/clock_getutc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * sched/clock_uptime.c
+ * sched/clock_getutc.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -44,7 +44,7 @@
#include <nuttx/time.h>
#include <nuttx/rtc.h>
-#if !defined(CONFIG_DISABLE_CLOCK) && defined(CONFIG_UPTIME) && !defined(clock_uptime)
+#if !defined(CONFIG_DISABLE_CLOCK) && defined(CONFIG_SYSTEM_UTC) && !defined(clock_getutc)
/****************************************************************************
* Pre-processor Definitions
@@ -59,7 +59,7 @@
****************************************************************************/
/****************************************************************************
- * Function: clock_uptime
+ * Function: clock_getutc
*
* Description:
* Return the current value of the system timer counter, which is only
@@ -75,7 +75,7 @@
*
****************************************************************************/
-time_t clock_uptime(void)
+time_t clock_getutc(void)
{
#ifdef CONFIG_RTC
if (g_rtc_enabled)
@@ -85,8 +85,8 @@ time_t clock_uptime(void)
else
#endif
{
- return g_uptime;
+ return g_system_utc;
}
}
-#endif /* CONFIG_DISABLE_CLOCK && CONFIG_UPTIME */
+#endif /* CONFIG_DISABLE_CLOCK && CONFIG_SYSTEM_UTC */
diff --git a/nuttx/sched/clock_initialize.c b/nuttx/sched/clock_initialize.c
index 2bb4d87a8..91220c19e 100644
--- a/nuttx/sched/clock_initialize.c
+++ b/nuttx/sched/clock_initialize.c
@@ -60,7 +60,7 @@
#define SEC_PER_HOUR ((time_t)60 * SEC_PER_MIN)
#define SEC_PER_DAY ((time_t)24 * SEC_PER_HOUR)
-/* Defined just so the uptime counter and system timer look similar */
+/* Defined just so the UTC counter and system counter/timer look similar */
#define incr_systimer() g_system_timer++
@@ -82,8 +82,8 @@
volatile clock_t g_system_timer = 0;
-#if CONFIG_UPTIME
-volatile time_t g_uptime = 0;
+#if CONFIG_SYSTEM_UTC
+volatile time_t g_system_utc = 0;
#endif
struct timespec g_basetime = {0,0};
@@ -94,10 +94,10 @@ uint32_t g_tickbias = 0;
**************************************************************************/
/* This variable is used to count ticks and to increment the one-second
- * uptime variable.
+ * UTC variable.
*/
-#if CONFIG_UPTIME
+#if CONFIG_SYSTEM_UTC
#if TICK_PER_SEC > 32767
static uint32_t g_tickcount = 0;
#elif TICK_PER_SEC > 255
@@ -105,7 +105,7 @@ static uint16_t g_tickcount = 0;
#else
static uint8_t g_tickcount = 0;
#endif
-#endif /* CONFIG_UPTIME */
+#endif /* CONFIG_SYSTEM_UTC */
/**************************************************************************
* Private Functions
@@ -120,19 +120,19 @@ static uint8_t g_tickcount = 0;
*
****************************************************************************/
-#if CONFIG_UPTIME
-static inline void incr_uptime(void)
+#if CONFIG_SYSTEM_UTC
+static inline void incr_utc(void)
{
g_tickcount++;
if (g_tickcount >= TICK_PER_SEC)
{
- g_uptime++;
+ g_system_utc++;
g_tickcount -= TICK_PER_SEC;
}
}
#else
-# define incr_uptime()
+# define incr_utc()
#endif
/****************************************************************************
@@ -160,8 +160,8 @@ void clock_initialize(void)
*/
g_system_timer = 0;
-#ifdef CONFIG_UPTIME
- g_uptime = 0;
+#ifdef CONFIG_SYSTEM_UTC
+ g_system_utc = 0;
#endif
/* Do we have hardware periodic timer support? */
@@ -206,7 +206,7 @@ void clock_timer(void)
incr_systimer();
- /* Increment the per-second uptime counter */
+ /* Increment the per-second UTC counter */
- incr_uptime();
+ incr_utc();
}