summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/clock.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-16 13:00:57 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-16 13:00:57 +0000
commitcbb245c0b6816c10be52a03a3ea8c66db8e0a7ae (patch)
tree15b55003014272570f06703cf7e612d9321a87e6 /nuttx/include/nuttx/clock.h
parent6a969146eb87c8b6bb06a64b37f7afecaa8144e6 (diff)
downloadnuttx-cbb245c0b6816c10be52a03a3ea8c66db8e0a7ae.tar.gz
nuttx-cbb245c0b6816c10be52a03a3ea8c66db8e0a7ae.tar.bz2
nuttx-cbb245c0b6816c10be52a03a3ea8c66db8e0a7ae.zip
More changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3513 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/clock.h')
-rw-r--r--nuttx/include/nuttx/clock.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/nuttx/include/nuttx/clock.h b/nuttx/include/nuttx/clock.h
index 4d641696f..62bc29910 100644
--- a/nuttx/include/nuttx/clock.h
+++ b/nuttx/include/nuttx/clock.h
@@ -125,19 +125,18 @@
* access to kernel global data
*/
-#if !defined(CONFIG_PTIMER) && __HAVE_KERNEL_GLOBALS
+#if __HAVE_KERNEL_GLOBALS
extern volatile uint32_t g_system_timer;
-#define clock_systimer() g_system_timer
+extern volatile uint32_t g_uptime;
#endif
-/* System uptime (in seconds) is only supported by periodic timer hardware */
+#if !defined(CONFIG_RTC) && __HAVE_KERNEL_GLOBALS
+#define clock_systimer() g_system_timer
#if defined(CONFIG_UPTIME)
-extern volatile uint32_t g_uptime;
-
-#if __HAVE_KERNEL_GLOBALS
-# define clock_uptime() g_uptime
+#define clock_uptime() g_uptime
#endif
+
#endif
/****************************************************************************
@@ -170,7 +169,7 @@ extern "C" {
*
****************************************************************************/
-#if defined(CONFIG_PTIMER) || !__HAVE_KERNEL_GLOBALS
+#if defined(CONFIG_RTC) || !__HAVE_KERNEL_GLOBALS
EXTERN uint32_t clock_systimer(void);
#endif