You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/25 05:38:21 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6510: Support for 2.13 inch display v2

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


##########
drivers/lcd/ssd1680.c:
##########
@@ -634,35 +679,50 @@ static int ssd1680_configuredisplay(struct ssd1680_dev_s *priv)
 
   /* Step 9: SSD1680_SET_RAMXCOUNT, 0 */
 
+  lcdinfo("Set ram X count (0x%02x): 0\n", SSD1680_SET_RAMXCOUNT);
   ssd1680_snd_cmd_with_data1(priv, SSD1680_SET_RAMXCOUNT, 0x00);
 
   /* Step 10: SSD1680_SET_RAMYCOUNT, 0, 0 */
 
+  lcdinfo("Set ram Y count (0x%02x): 0\n", SSD1680_SET_RAMYCOUNT);
   ssd1680_snd_cmd_with_data2(priv, SSD1680_SET_RAMYCOUNT, 0x00, 0x00);
 
   /* Step 11: Lookup table */
 
-  lcdinfo("Write lookup table (%d bytes)\n", sizeof (ssd1680_lut));
+  lcdinfo("Write lookup table (0x%02x): (%d bytes)\n", SSD1680_WRITE_LUT,
+      sizeof (ssd1680_lut));
   ssd1680_snd_cmd_with_data(priv, SSD1680_WRITE_LUT, ssd1680_lut,
       sizeof (ssd1680_lut));
 
   /* Step 12: Write sequence */
 
-  lcdinfo("Write controll sequence 0x%02x\n", 0xc0);
-  ssd1680_snd_cmd_with_data1(priv, SSD1680_DISP_CTRL2, 0xc0);
+  lcdinfo("Write control sequence (0x%02x): 0x%02x\n", SSD1680_DISP_CTRL2,
+      0xc0);
+  ssd1680_snd_cmd_with_data1(priv, SSD1680_DISP_CTRL2, 0xc7);
 
   /* Step 13: Master Activate and busy wait */
 
+  lcdinfo("Write master activate (0x%02x) command\n",
+      SSD1680_MASTER_ACTIVATE);
   ssd1680_snd_cmd_with_data0(priv, SSD1680_MASTER_ACTIVATE);
-  ssd1680_busy_wait(priv);
 
-  lcdinfo("Configuration ready\n");
-  priv->is_conf = true;
-  return OK;
+  ret = ssd1680_busy_wait(priv);
+exit:
+  if (ret == OK)
+    {
+      lcdinfo("Configuration ready\n");
+      priv->is_conf = true;
+    }
+  else

Review Comment:
   move exit here?



-- 
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-unsubscribe@nuttx.apache.org

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