aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-05 14:27:15 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-05 14:27:15 +0000
commit2303c1542cc8d15b960272a90a48780da126a584 (patch)
treefe17e3c452e52e10aeb3eb2276b5f88f479f9ec3 /os/hal
parent03acd18161901b17be78e280ebbebbc0bbd47c8f (diff)
downloadChibiOS-2303c1542cc8d15b960272a90a48780da126a584.tar.gz
ChibiOS-2303c1542cc8d15b960272a90a48780da126a584.tar.bz2
ChibiOS-2303c1542cc8d15b960272a90a48780da126a584.zip
I2C. Small fixes
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3122 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32/i2c_lld.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c
index f44749e11..5a07630ae 100644
--- a/os/hal/platforms/STM32/i2c_lld.c
+++ b/os/hal/platforms/STM32/i2c_lld.c
@@ -590,7 +590,7 @@ void i2c_lld_master_transmit(I2CDriver *i2cp, uint16_t slave_addr,
while((i2cp->id_i2c->CR1 & I2C_CR1_START) && timeout--)
;
/* is timeout overflows? */
- chDbgAssert(timeout < I2C_START_TIMEOUT,
+ chDbgAssert(timeout <= I2C_START_TIMEOUT,
"i2c_lld_master_transmit(), #1", "time is out");
@@ -663,7 +663,7 @@ void i2c_lld_master_receive(I2CDriver *i2cp, uint16_t slave_addr,
while((i2cp->id_i2c->CR1 & I2C_CR1_START) && timeout--)
;
/* is timeout overflows? */
- chDbgAssert(timeout < I2C_START_TIMEOUT,
+ chDbgAssert(timeout <= I2C_START_TIMEOUT,
"i2c_lld_master_receive(), #1", "time is out");
}
@@ -706,7 +706,7 @@ void i2c_lld_master_transceive(I2CDriver *i2cp){
while((i2cp->id_i2c->CR1 & I2C_CR1_START) && timeout--)
;
/* is timeout overflows? */
- chDbgAssert(timeout < I2C_START_TIMEOUT,
+ chDbgAssert(timeout <= I2C_START_TIMEOUT,
"i2c_lld_master_receive(), #1", "time is out");
}