diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-10 18:19:03 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-10 18:19:03 -0600 |
commit | d14ba97a9346bf198886896d0b175f271f13d490 (patch) | |
tree | c53bf95227efa97d3125ef435fc1e9f8cbbdc011 | |
parent | b2ef5f0d01a93f991267a9dbd58ec903319d96bf (diff) | |
download | nuttx-d14ba97a9346bf198886896d0b175f271f13d490.tar.gz nuttx-d14ba97a9346bf198886896d0b175f271f13d490.tar.bz2 nuttx-d14ba97a9346bf198886896d0b175f271f13d490.zip |
SAMA5 TWI: Number of bytes transferred not be incremented on the first byte. From David Sidrane
-rw-r--r-- | nuttx/ChangeLog | 3 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_twi.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 4840987d0..7a9745ba2 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7162,4 +7162,7 @@ functions are called early in initialization before the tasking structures are initialized, they will not behavr properly (2014-4-10). + * arch/arm/src/sama5/sam_twi.c: TWI data sending is fails to increment + the number of byes transferred on first byte sent. from David Sidrane + (2014-4-10). diff --git a/nuttx/arch/arm/src/sama5/sam_twi.c b/nuttx/arch/arm/src/sama5/sam_twi.c index f68f98b04..f0dfc64a0 100644 --- a/nuttx/arch/arm/src/sama5/sam_twi.c +++ b/nuttx/arch/arm/src/sama5/sam_twi.c @@ -719,7 +719,7 @@ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) /* Write first byte to send.*/ - twi_putrel(priv, SAM_TWI_THR_OFFSET, msg->buffer[0]); + twi_putrel(priv, SAM_TWI_THR_OFFSET, msg->buffer[priv->xfrd++]); /* Enable write interrupt */ |