tmedicci commented on code in PR #10885: URL: https://github.com/apache/nuttx/pull/10885#discussion_r1354880734
########## boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_gpio.c: ########## @@ -0,0 +1,388 @@ +/**************************************************************************** + * boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_gpio.c + * + * 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 <sys/types.h> +#include <nuttx/irq.h> +#include <arch/irq.h> +#include <assert.h> +#include <debug.h> + +#include <nuttx/ioexpander/gpio.h> + +#include <arch/board/board.h> + +#include "esp32s3-eye.h" +#include "esp32s3_gpio.h" +#include "hardware/esp32s3_gpio_sigmap.h" + +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_GPIO_LOWER_HALF) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#if !defined(CONFIG_ESP32S3_GPIO_IRQ) && BOARD_NGPIOINT > 0 +# error "NGPIOINT is > 0 and GPIO interrupts aren't enabled" +#endif + +/* Output pins. GPIO3 is the LED, GPIO48 is the LCD backlight. + * used. + */ + +#define GPIO_OUT1 3 +#define GPIO_OUT2 48 Review Comment: Alright! Pin 48 is for the LCD backlight. You don't actually need to expose it here as a GPIO unless you want to toggle it on/off while using the system. In this case, it makes sense to use the `gpio_write` function instead of reconfiguring it and toggling it on boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_board_lcd.c -- 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