diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-06 21:10:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-06 21:10:00 +0000 |
commit | bbbdceb9d13441f4b96257718ed090b8998759f7 (patch) | |
tree | 6bb4e7cbc0c05dc47f8d7de2848b67b189bd5279 /nuttx/include/nuttx/clock.h | |
parent | 4c3a7673e9a391302a0e2417d8846bfdf7d9171f (diff) | |
download | nuttx-bbbdceb9d13441f4b96257718ed090b8998759f7.tar.gz nuttx-bbbdceb9d13441f4b96257718ed090b8998759f7.tar.bz2 nuttx-bbbdceb9d13441f4b96257718ed090b8998759f7.zip |
More timer changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3572 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/clock.h')
-rw-r--r-- | nuttx/include/nuttx/clock.h | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/nuttx/include/nuttx/clock.h b/nuttx/include/nuttx/clock.h index cde1dd2db..71f0c7e8a 100644 --- a/nuttx/include/nuttx/clock.h +++ b/nuttx/include/nuttx/clock.h @@ -128,15 +128,18 @@ #if __HAVE_KERNEL_GLOBALS extern volatile uint32_t g_system_timer; extern volatile uint32_t g_system_utc; -#endif - -#if !defined(CONFIG_RTC) && __HAVE_KERNEL_GLOBALS -#define clock_systimer() g_system_timer -#if defined(CONFIG_SYSTEM_UTC) -#define clock_getutc() g_system_utc +#if TICK_PER_SEC > 32767 +extern volatile uint32_t g_tickcount; +#elif TICK_PER_SEC > 255 +extern volatile uint16_t g_tickcount; +#else +extern volatile uint8_t g_tickcount; #endif +#endif /* __HAVE_KERNEL_GLOBALS */ +#if !defined(CONFIG_SYSTEM_UTC) && __HAVE_KERNEL_GLOBALS +#define clock_systimer() g_system_timer #endif /**************************************************************************** @@ -173,27 +176,6 @@ extern "C" { EXTERN uint32_t clock_systimer(void); #endif -/**************************************************************************** - * Function: clock_getutc - * - * Description: - * Return the current value of the system timer counter, which is only - * enabled when system is in active mode. - * - * Parameters: - * None - * - * Return Value: - * The current value of the system time counter - * - * Assumptions: - * - ****************************************************************************/ - -#if defined(CONFIG_SYSTEM_UTC) && !__HAVE_KERNEL_GLOBALS -EXTERN time_t clock_getutc(void); -#endif - #undef EXTERN #ifdef __cplusplus } |