diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-02 20:35:47 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-02 20:35:47 +0000 |
commit | 1c62f74c05a78997e62274728b95c8536e6a0953 (patch) | |
tree | 66ae73458cd5a2c3cb2e8ccdb52b14f55c31a62f /os/hal/include/i2c.h | |
parent | 05b812d1bfd5f0d3503b86971a1fe2439bf1e4a8 (diff) | |
download | ChibiOS-1c62f74c05a78997e62274728b95c8536e6a0953.tar.gz ChibiOS-1c62f74c05a78997e62274728b95c8536e6a0953.tar.bz2 ChibiOS-1c62f74c05a78997e62274728b95c8536e6a0953.zip |
I2C. Added wrappers with TIME_INFINITE timeout.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3715 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/i2c.h')
-rw-r--r-- | os/hal/include/i2c.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h index 80668f28c..47a1404fa 100644 --- a/os/hal/include/i2c.h +++ b/os/hal/include/i2c.h @@ -99,6 +99,21 @@ typedef enum { /* Driver macros. */
/*===========================================================================*/
+/**
+ * @brief Wrap i2cMasterTransmitTimeout function with TIME_INFINITE timeout.
+ * @api
+ */
+#define i2cMasterTransmit(i2cp, addr, txbuf, txbytes, rxbuf, rxbytes) \
+ (i2cMasterTransmitTimeout(i2cp, addr, txbuf, txbytes, rxbuf, rxbytes, \
+ TIME_INFINITE))
+
+/**
+ * @brief Wrap i2cMasterReceiveTimeout function with TIME_INFINITE timeout.
+ * @api
+ */
+#define i2cMasterReceive(i2cp, addr, rxbuf, rxbytes) \
+ (i2cMasterReceiveTimeout(i2cp, addr, rxbuf, rxbytes, TIME_INFINITE))
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
|