From 05dd8c79b40af0221973ba0ee19ee0066c3a8dde Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 9 Jun 2007 15:49:44 +0000 Subject: Add support for custom system timer frequency git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@274 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/include/time.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'nuttx/include/time.h') diff --git a/nuttx/include/time.h b/nuttx/include/time.h index 7a9731423..92b849fbe 100644 --- a/nuttx/include/time.h +++ b/nuttx/include/time.h @@ -51,9 +51,16 @@ * Definitions ********************************************************************************/ -/* Clock tick of the system */ +/* Clock tick of the system (frequency Hz). The default value is 100Hz, but this + * default setting can be overridden by defining the clock interval in + * milliseconds as CONFIG_MSEC_PER_TICK in the board configuration file. + */ -#define CLK_TCK 100 +#ifdef CONFIG_MSEC_PER_TICK +# define CLK_TCK (1000/CONFIG_MSEC_PER_TICK) +#else +# define CLK_TCK (100) +#endif /* This is the only clock_id supported by the "Clock and Timer * Functions." -- cgit v1.2.3