casaroli commented on code in PR #21480: URL: https://github.com/apache/nuttx/pull/21480#discussion_r4501774290
########## boards/xtensa/esp32s3/esp32s3-r8/src/esp32s3_board_lcd.c: ########## @@ -0,0 +1,155 @@ +/**************************************************************************** + * boards/xtensa/esp32s3/esp32s3-r8/src/esp32s3_board_lcd.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> + +#include <stdio.h> +#include <stdbool.h> +#include <debug.h> +#include <errno.h> + +#include <nuttx/arch.h> +#include <nuttx/board.h> +#include <nuttx/signal.h> +#include <nuttx/spi/spi.h> +#include <nuttx/lcd/lcd.h> +#include <nuttx/lcd/st7789.h> + +#include <arch/board/board.h> + +#include "espressif/esp_gpio.h" +#include "esp32s3_spi.h" +#include "hardware/esp32s3_gpio_sigmap.h" + +#include "esp32s3-r8.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static struct spi_dev_s *g_spidev; +static struct lcd_dev_s *g_lcd; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_lcd_initialize + * + * Description: + * Initialize the LCD video hardware. The initial state of the LCD is + * fully initialized, display memory cleared, and the LCD ready to use, but + * with the power setting at 0 (full off). + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int board_lcd_initialize(void) +{ + /* Initialize non-SPI GPIOs */ + + esp32s3_configgpio(ESP32S3_R8_DISPLAY_DC, OUTPUT); Review Comment: `esp32s3_configgpio()` and `esp32s3_gpiowrite()` do not exist on master, so `esp32s3-r8:lcd` does not build (CI xtensa-03: "implicit declaration of function 'esp32s3_configgpio'; did you mean 'esp_configgpio'?"). esp32s3_touchscreen.c lines 66, 83, 84 and 86 have the same calls. Fix: use `esp_configgpio()` and `esp_gpiowrite()` from `espressif/esp_gpio.h` in both files. ########## boards/xtensa/esp32s3/esp32s3-r8/configs/openvela/defconfig: ########## @@ -0,0 +1,66 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_ARCH_LEDS is not set +# CONFIG_ESP32S3_RTC is not set +# CONFIG_NSH_ARGCAT is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_ARCH="xtensa" +CONFIG_ARCH_BOARD="esp32s3-r8" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_ESP32S3_R8=y +CONFIG_ARCH_CHIP="esp32s3" +CONFIG_ARCH_CHIP_ESP32S3=y +CONFIG_ARCH_CHIP_ESP32S3WROOM2N32R8V=y Review Comment: This config does not build: `esp_irq.c:127: #error "CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC must be enabled for Xtensa-based Espressif SoCs"` (CI xtensa-03). The other six configs of this board set it. Fix: add `CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y`, `CONFIG_ARCH_IRQ_TO_NDX=y` and `CONFIG_ARCH_NUSER_INTERRUPTS=2`, then regenerate the file with `make savedefconfig` (CI also reports it and lcd/defconfig as not normalized). -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
