Skip to content

Commit

Permalink
Merge pull request #222 from han1raaijmakers/imxrtI2C
Browse files Browse the repository at this point in the history
imxrt added missing i2c prescale mask
  • Loading branch information
davids5 committed Feb 7, 2020
2 parents cabd692 + d79e673 commit 2d5141b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/arm/src/imxrt/imxrt_lpi2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,8 @@ static void imxrt_lpi2c_setclock(FAR struct imxrt_lpi2c_priv_s *priv,
}
}

imxrt_lpi2c_modifyreg(priv, IMXRT_LPI2C_MCFGR1_OFFSET, 0,
imxrt_lpi2c_modifyreg(priv, IMXRT_LPI2C_MCFGR1_OFFSET,
LPI2C_MCFGR1_PRESCALE_MASK,
LPI2C_MCFGR1_PRESCALE(best_prescale));

/* Re-enable LPI2C if it was enabled previously */
Expand Down Expand Up @@ -1304,7 +1305,8 @@ static int imxrt_lpi2c_isr_process(struct imxrt_lpi2c_priv_s *priv)

if ((priv->msgv->flags & I2C_M_NOSTART) == 0)
{
imxrt_lpi2c_traceevent(priv, I2CEVENT_STARTRESTART, priv->msgc);
imxrt_lpi2c_traceevent(priv, I2CEVENT_STARTRESTART,
priv->msgc);
imxrt_lpi2c_sendstart(priv, priv->msgv->addr);
}
else
Expand Down

0 comments on commit 2d5141b

Please sign in to comment.