summaryrefslogtreecommitdiff
path: root/nuttx/include/time.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-06-09 15:49:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-06-09 15:49:44 +0000
commit05dd8c79b40af0221973ba0ee19ee0066c3a8dde (patch)
tree6aa570fa88dbc3e31d4d6061276f3f72c21b3ff3 /nuttx/include/time.h
parent747de88ae98ba1e232db4c61b01b114772236c02 (diff)
downloadpx4-nuttx-05dd8c79b40af0221973ba0ee19ee0066c3a8dde.tar.gz
px4-nuttx-05dd8c79b40af0221973ba0ee19ee0066c3a8dde.tar.bz2
px4-nuttx-05dd8c79b40af0221973ba0ee19ee0066c3a8dde.zip
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
Diffstat (limited to 'nuttx/include/time.h')
-rw-r--r--nuttx/include/time.h11
1 files changed, 9 insertions, 2 deletions
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."