mirror of
https://github.com/apache/nuttx.git
synced 2026-09-03 23:52:58 +00:00
SAMV7: TWIHS: Correct timeout calculation; correct some issues with Multi-Message-Transfer
This commit is contained in:
parent
f46298105a
commit
945e137382
1 changed files with 4 additions and 4 deletions
|
|
@ -488,7 +488,7 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size)
|
|||
* TWIHS transfer stalls.
|
||||
*/
|
||||
|
||||
wd_start(priv->timeout, timeout, twi_timeout, 1, (uint32_t)priv);
|
||||
wd_start(priv->timeout, (timeout * size), twi_timeout, 1, (uint32_t)priv);
|
||||
|
||||
/* Wait for either the TWIHS transfer or the timeout to complete */
|
||||
|
||||
|
|
@ -568,7 +568,7 @@ static int twi_interrupt(struct twi_dev_s *priv)
|
|||
|
||||
if (priv->xfrd >= msg->length)
|
||||
{
|
||||
struct i2c_msg_s *next = msg++;
|
||||
struct i2c_msg_s *next = (msg + 1);
|
||||
|
||||
/* Is there another message to after this one? Does it require a
|
||||
* restart?
|
||||
|
|
@ -601,7 +601,7 @@ static int twi_interrupt(struct twi_dev_s *priv)
|
|||
|
||||
else if (priv->xfrd == (msg->length - 1))
|
||||
{
|
||||
struct i2c_msg_s *next = msg++;
|
||||
struct i2c_msg_s *next = (msg + 1);
|
||||
|
||||
/* Is there another message to after this one? Does it require a
|
||||
* restart?
|
||||
|
|
@ -626,7 +626,7 @@ static int twi_interrupt(struct twi_dev_s *priv)
|
|||
|
||||
if (priv->xfrd >= msg->length)
|
||||
{
|
||||
struct i2c_msg_s *next = msg++;
|
||||
struct i2c_msg_s *next = (msg + 1);
|
||||
|
||||
/* Is there another message to after this one? Does it require a
|
||||
* restart?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue