adamkaliszan commented on code in PR #6510:
URL: https://github.com/apache/incubator-nuttx/pull/6510#discussion_r907984008


##########
drivers/lcd/ssd1680.c:
##########
@@ -878,19 +896,30 @@ static void ssd1680_select(FAR struct ssd1680_dev_s 
*priv, bool cs)
     }
 }
 
-static void ssd1680_busy_wait(FAR struct ssd1680_dev_s *priv)
+static int ssd1680_busy_wait(FAR struct ssd1680_dev_s *priv)
 {
+  int maks_wait_ticks = 200;
   if ((priv->board_priv != NULL) && (priv->board_priv->check_busy != NULL))
     {
-      while (priv->board_priv->check_busy())
+      while (priv->board_priv->check_busy() && maks_wait_ticks > 0)
         {
-          nxsig_usleep(1);
+          nxsig_usleep(1000);
+          maks_wait_ticks--;
         }
     }
   else
     {
-      nxsig_usleep(2000000);
+      nxsig_usleep(maks_wait_ticks);

Review Comment:
   OK. It is done.



##########
drivers/lcd/ssd1680.c:
##########
@@ -878,19 +896,30 @@ static void ssd1680_select(FAR struct ssd1680_dev_s 
*priv, bool cs)
     }
 }
 
-static void ssd1680_busy_wait(FAR struct ssd1680_dev_s *priv)
+static int ssd1680_busy_wait(FAR struct ssd1680_dev_s *priv)
 {
+  int maks_wait_ticks = 200;
   if ((priv->board_priv != NULL) && (priv->board_priv->check_busy != NULL))
     {
-      while (priv->board_priv->check_busy())
+      while (priv->board_priv->check_busy() && maks_wait_ticks > 0)

Review Comment:
   OK It is 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