SAMA5 TWI: Number of bytes transferred not be incremented on the first byte. From David Sidrane

This commit is contained in:
Gregory Nutt
2014-04-10 18:19:03 -06:00
parent 1712f42cf3
commit d128b47c71
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -7162,4 +7162,7 @@
functions are called early in initialization before the tasking functions are called early in initialization before the tasking
structures are initialized, they will not behavr properly structures are initialized, they will not behavr properly
(2014-4-10). (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).
+1 -1
View File
@@ -719,7 +719,7 @@ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg)
/* Write first byte to send.*/ /* 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 */ /* Enable write interrupt */