aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-11 12:24:04 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-11 12:24:04 +0000
commitab736d4dfd758091ed3d6244f7170dd641739aed (patch)
treedf838e9728a3bb79ee0c988213bdd4971538067e /os/nil/include
parent0e436b1cb6c0dea2280b09208a43af636a29ce64 (diff)
downloadChibiOS-ab736d4dfd758091ed3d6244f7170dd641739aed.tar.gz
ChibiOS-ab736d4dfd758091ed3d6244f7170dd641739aed.tar.bz2
ChibiOS-ab736d4dfd758091ed3d6244f7170dd641739aed.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6292 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil/include')
-rw-r--r--os/nil/include/nil.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h
index 98dd2c04e..c6994dfe1 100644
--- a/os/nil/include/nil.h
+++ b/os/nil/include/nil.h
@@ -128,7 +128,18 @@ typedef struct nil_thread thread_t;
#endif
/**
- * @brief System timer resolution in Hz.
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(NIL_CFG_ST_RESOLUTION) || defined(__DOXYGEN__)
+#define NIL_CFG_ST_RESOLUTION 32
+#endif
+
+/**
+ * @brief System tick frequency.
+ * @note This value together with the @p NIL_CFG_ST_RESOLUTION
+ * option defines the maximum amount of time allowed for
+ * timeouts.
*/
#if !defined(NIL_CFG_ST_FREQUENCY) || defined(__DOXYGEN__)
#define NIL_CFG_ST_FREQUENCY 100
@@ -191,12 +202,17 @@ typedef struct nil_thread thread_t;
"ChibiOS/RT instead"
#endif
+#if (NIL_CFG_ST_RESOLUTION != 16) && (NIL_CFG_ST_RESOLUTION != 32)
+#error "invalid NIL_CFG_ST_RESOLUTION specified, must be 16 or 32"
+#endif
+
#if NIL_CFG_ST_FREQUENCY <= 0
-#error "invalid NIL_CFG_ST_FREQUENCY specified"
+#error "invalid NIL_CFG_ST_FREQUENCY specified, must be greated than zero"
#endif
#if (NIL_CFG_ST_TIMEDELTA < 0) || (NIL_CFG_ST_TIMEDELTA == 1)
-#error "invalid NIL_CFG_ST_TIMEDELTA specified"
+#error "invalid NIL_CFG_ST_TIMEDELTA specified, must " \
+ "be zero or greater than one"
#endif
#if NIL_CFG_ENABLE_ASSERTS