acassis commented on code in PR #18397: URL: https://github.com/apache/nuttx/pull/18397#discussion_r2817183220
########## boards/arm/stm32h7/nucleo-h753zi/src/nucleo-h753zi.h: ########## @@ -0,0 +1,1236 @@ +/**************************************************************************** + * boards/arm/stm32h7/nucleo-h753zi/src/nucleo-h753zi.h + * + * 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. + * + ****************************************************************************/ + +#ifndef __BOARDS_ARM_STM32H7_NUCLEO_H753ZI_SRC_NUCLEO_H753ZI_H +#define __BOARDS_ARM_STM32H7_NUCLEO_H753ZI_SRC_NUCLEO_H753ZI_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> +#include <nuttx/compiler.h> + +#include <stdint.h> +#include <stdbool.h> + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * SECTION 1: FEATURE CONFIGURATION + ****************************************************************************/ + +/* Core System Features */ + +#define HAVE_PROC 1 +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 +#define HAVE_USBMONITOR 1 +#define HAVE_MTDCONFIG 1 +#define HAVE_PROGMEM_CHARDEV 1 +#define HAVE_RTC_DRIVER 1 + +/* USB Feature Dependencies */ + +#ifndef CONFIG_STM32H7_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#if !defined(HAVE_USBDEV) +# undef CONFIG_USBDEV_TRACE +#endif + +#if !defined(HAVE_USBHOST) +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) +# undef HAVE_USBMONITOR +#endif + +/* MTD Feature Dependencies */ + +#if !defined(CONFIG_STM32H7_PROGMEM) || !defined(CONFIG_MTD_PROGMEM) +# undef HAVE_PROGMEM_CHARDEV +#endif + +/* RTC Feature Dependencies */ + +#if !defined(CONFIG_RTC) || !defined(CONFIG_RTC_DRIVER) +# undef HAVE_RTC_DRIVER +#endif + +/* Flash-based Parameters */ + +#if defined(CONFIG_MMCSD) +# define FLASH_BASED_PARAMS +#endif + +/**************************************************************************** + * SECTION 2: DEVICE DRIVER PATHS + ****************************************************************************/ + +/* LED Driver */ + +#define LED_DRIVER_PATH "/dev/userleds" + +/* Button Driver */ + +#define BUTTONS_DRIVER_PATH "/dev/buttons" + +/* RTC Driver */ + +#define RTC_DRIVER_PATH "/dev/rtc0" + +/* CAN Driver */ + +#define CAN0_DRIVER_PATH "/dev/can0" + +/* Sensor Drivers */ + +#define MFRC522_DEVPATH "/dev/rfid0" + +/* Display Drivers */ + +#define ST7796_FB_PATH "/dev/fb0" Review Comment: @vrmay23 @linguini1 normally these patches are hard-code, because they shouldn't change at all, see an example: ``` #ifdef CONFIG_CL_MFRC522 ret = stm32_mfrc522initialize("/dev/rfid0"); if (ret < 0) { syslog(LOG_ERR, "ERROR: stm32_mfrc522initialize() failed: %d\n", ret); } #endif /* CONFIG_CL_MFRC522 */ ``` There is not reason to change it because the application are expecting exactly that name by default. The only reason to change it is when you have two or more devices in your board (that normally is not the case), but in this case you add a new initialization call calling the right name. I think it is an over-complicated of a simple thing. @raiden00pl what do you think? -- 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]
