xiaoxiang781216 commented on code in PR #6965:
URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r988529067


##########
arch/arm/src/stm32h7/stm32_i2c.c:
##########
@@ -2511,7 +2473,7 @@ static int stm32_i2c_transfer(struct i2c_master_s *dev,
 
   /* Ensure that address or flags don't change meanwhile */
 
-  ret = nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
+  ret = nxmutex_lock(&((struct stm32_i2c_inst_s *)dev)->priv->lock);

Review Comment:
   Done.



##########
arch/arm/src/stm32l4/stm32l4_i2c.c:
##########
@@ -2724,7 +2686,7 @@ static int stm32l4_i2c_transfer(struct i2c_master_s *dev,
 
   /* Ensure that address or flags don't change meanwhile */
 
-  ret = nxsem_wait(&((struct stm32l4_i2c_inst_s *)dev)->priv->sem_excl);
+  ret = nxmutex_lock(&((struct stm32l4_i2c_inst_s *)dev)->priv->lock);

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to