gustavonihei commented on code in PR #6511:
URL: https://github.com/apache/incubator-nuttx/pull/6511#discussion_r907344567


##########
boards/xtensa/esp32/common/src/esp32_ssd1680.c:
##########
@@ -105,9 +105,8 @@ int board_lcd_initialize(void)
 
   /* Initialize additional I/O for e-ink display */
 
-#if defined(CONFIG_SSD1680_GPIO_PIN_DTA_CMD) && \
-  (CONFIG_SSD1680_GPIO_PIN_DTA_CMD >= 0)
-  esp32_configgpio(CONFIG_SSD1680_GPIO_PIN_DTA_CMD, OUTPUT);
+#if defined(DISPLAY_DC) && (DISPLAY_DC >= 0)

Review Comment:
   Actually, this check is being performed too late. If the user forgets to 
define `DISPLAY_DC`, the code will still build successfully, probably consuming 
some precious debugging time of the unaware user.
   
   Could you please refactor these preprocessor checks and do them like is 
being done on the ILI9341 wrapper?
   
https://github.com/apache/incubator-nuttx/blob/master/boards/xtensa/esp32/common/src/esp32_ili9341.c#L51-L59?
   
   This is a fail-fast approach, so in case any of the required definitions is 
missing, the build will fail and the user will be warned early in the process.



-- 
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