diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-09 13:58:19 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-09 13:58:19 +0000 |
commit | e7e63d88dbe7eb57e8d13236e4da772d7fa2a912 (patch) | |
tree | 86ec800b96e2b0ad84e35f795bc5d6d638c12605 /os/hal/src | |
parent | da68de0d34eaeeb4f0638c64b661c38c7f06b871 (diff) | |
parent | 28cb4b4849c6e124baed09bdb4753d7b87a47483 (diff) | |
download | ChibiOS-e7e63d88dbe7eb57e8d13236e4da772d7fa2a912.tar.gz ChibiOS-e7e63d88dbe7eb57e8d13236e4da772d7fa2a912.tar.bz2 ChibiOS-e7e63d88dbe7eb57e8d13236e4da772d7fa2a912.zip |
RTC. Code compiles but not tested.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rtc_dev@3588 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/i2c.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/src/i2c.c b/os/hal/src/i2c.c index f7f7c335e..c67f3a8c6 100644 --- a/os/hal/src/i2c.c +++ b/os/hal/src/i2c.c @@ -168,6 +168,8 @@ msg_t i2cMasterTransmit(I2CDriver *i2cp, ((rxbytes == 0) || ((rxbytes > 0) && (rxbuf != NULL))) &&
(timeout > TIME_IMMEDIATE) && (errors != NULL),
"i2cMasterTransmit");
+
+ i2c_lld_wait_bus_free(i2cp);
i2cp->errors = I2CD_NO_ERROR; /* clear error flags from previous run */
chDbgAssert(i2cp->id_state == I2C_READY,
"i2cMasterTransmit(), #1", "not ready");
@@ -209,6 +211,8 @@ msg_t i2cMasterReceive(I2CDriver *i2cp, (rxbytes > 0) && (rxbuf != NULL) &&
(timeout > TIME_IMMEDIATE) && (errors != NULL),
"i2cMasterReceive");
+
+ i2c_lld_wait_bus_free(i2cp);
i2cp->errors = I2CD_NO_ERROR; /* clear error flags from previous run */
chDbgAssert(i2cp->id_state == I2C_READY,
"i2cMasterReceive(), #1", "not ready");
|