diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-11 07:02:14 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-11 07:02:14 -0600 |
commit | b2dd78a3aa913cbc6ba0cd64110bb4dddea9b66f (patch) | |
tree | 02bad8c4cd9aa5dcc4f93892c71038fe74dae18c | |
parent | 2629caec3c336ba4aa30f9f79c0d87e80f0ddaf4 (diff) | |
download | nuttx-b2dd78a3aa913cbc6ba0cd64110bb4dddea9b66f.tar.gz nuttx-b2dd78a3aa913cbc6ba0cd64110bb4dddea9b66f.tar.bz2 nuttx-b2dd78a3aa913cbc6ba0cd64110bb4dddea9b66f.zip |
Tiva I2C: Fix error in assertion logic
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_i2c.c b/nuttx/arch/arm/src/tiva/tiva_i2c.c index 383a3a745..2ccee93ee 100644 --- a/nuttx/arch/arm/src/tiva/tiva_i2c.c +++ b/nuttx/arch/arm/src/tiva/tiva_i2c.c @@ -1462,7 +1462,7 @@ static uint32_t tiva_i2c_setclock(struct tiva_i2c_priv_s *priv, uint32_t frequen tmp = 2 * 10 * frequency; regval = (((SYSCLK_FREQUENCY + tmp - 1) / tmp) - 1) << I2CM_TPR_SHIFT; - DEBUGASSERT((regval & I2CM_TPR_MASK) == 0); + DEBUGASSERT((regval & I2CM_TPR_MASK) == regval); tiva_i2c_putreg(priv, TIVA_I2CM_TPR_OFFSET, regval); #ifdef TIVA_I2CSC_PP_OFFSET |