gustavonihei commented on code in PR #6511: URL: https://github.com/apache/incubator-nuttx/pull/6511#discussion_r908415534
########## 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, and later will probably consume 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 still left unresolved. Those defines are crucial for the driver operation, and if they are not present, the user will execute a dummy driver, which is not desirable. PS: @xiaoxiang781216 please, leave the conversation resolution to me. -- 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