patacongo commented on a change in pull request #275: AT24 EEPROM Increase 
Polling Retries
URL: https://github.com/apache/incubator-nuttx/pull/275#discussion_r379473468
 
 

 ##########
 File path: drivers/eeprom/i2c_xx24xx.c
 ##########
 @@ -266,6 +267,7 @@ static int ee24xx_waitwritecomplete(FAR struct 
ee24xx_dev_s *eedev,
   do
     {
      ret = I2C_TRANSFER(eedev->i2c, msgs, 1);
+     up_udelay(10);
 
 Review comment:
   up_udelay() should only be used during initialize.  It has disasterous 
consequences on really time performance since it is a tight loop and blocks all 
other tasks.  The code was better without this because you had  chance  to get 
out of the loop sooner.  No, there is almost a guaranteed block, hogging the 
CPU for a minimum of 10 usec.
   
   You got some very bad advice.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to