diff options
| author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-23 08:11:23 +0000 |
|---|---|---|
| committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-23 08:11:23 +0000 |
| commit | 4ec82f62c18894d92bafc6c6f98784650106373d (patch) | |
| tree | a0cec5585dff0434608241c373b9ad30af5ae869 /test/test.h | |
| parent | c877f5bfcc5301b441c9b13e8c32d83e9df04f37 (diff) | |
| parent | 2a494cb534dbe3535a9bf4c61dfbc8b6c9e750be (diff) | |
| download | ChibiOS-4ec82f62c18894d92bafc6c6f98784650106373d.tar.gz ChibiOS-4ec82f62c18894d92bafc6c6f98784650106373d.tar.bz2 ChibiOS-4ec82f62c18894d92bafc6c6f98784650106373d.zip | |
I2C. 1 - Merge code from trunk. 2 - Fix driver problems detected by the CH_DBG_SYSTEM_STATE_CHECK
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3249 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/test.h')
| -rw-r--r-- | test/test.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test.h b/test/test.h index 31806fddb..b1fd311e6 100644 --- a/test/test.h +++ b/test/test.h @@ -127,6 +127,22 @@ extern "C" { }
/**
+ * @brief Test assertion with lock.
+ *
+ * @param[in] point numeric assertion identifier
+ * @param[in] condition a boolean expression that must be verified to be true
+ * @param[in] msg failure message
+ */
+#define test_assert_lock(point, condition, msg) { \
+ chSysLock(); \
+ if (_test_assert(point, condition)) { \
+ chSysUnlock(); \
+ return; \
+ } \
+ chSysUnlock(); \
+}
+
+/**
* @brief Test sequence assertion.
*
* @param[in] point numeric assertion identifier
|
