raiden00pl commented on code in PR #8992: URL: https://github.com/apache/nuttx/pull/8992#discussion_r1163835897
########## arch/arm/src/stm32/hardware/stm32_pinmap.h: ########## @@ -101,26 +105,49 @@ /* STM32 F2 Family **********************************************************/ #elif defined(CONFIG_STM32_STM32F20XX) -# include "hardware/stm32f20xxx_pinmap.h" - +# if defined(STM32_USE_LEGACY_PINMAP) Review Comment: should be CONFIG_STM32_USE_LEGACY_PINMAP. Same in other places. ########## arch/arm/src/stm32f0l0g0/hardware/stm32_pinmap.h: ########## @@ -28,20 +28,37 @@ #include <nuttx/config.h> #include "chip.h" -#if defined(CONFIG_STM32F0L0G0_STM32F03X) -# include "hardware/stm32f03x_pinmap.h" -#elif defined(CONFIG_STM32F0L0G0_STM32F05X) -# include "hardware/stm32f05x_pinmap.h" -#elif defined(CONFIG_STM32F0L0G0_STM32F07X) -# include "hardware/stm32f07x_pinmap.h" -#elif defined(CONFIG_STM32F0L0G0_STM32F09X) -# include "hardware/stm32f09x_pinmap.h" -#elif defined(CONFIG_ARCH_CHIP_STM32L0) -# include "hardware/stm32l0_pinmap.h" -#elif defined(CONFIG_ARCH_CHIP_STM32G0) -# include "hardware/stm32g0_pinmap.h" +#if defined(CONFIG_STM32F0G0L0_USE_LEGACY_PINMAP) +# if defined(CONFIG_STM32F0L0G0_STM32F03X) Review Comment: missing pragma warning ########## arch/arm/src/stm32/hardware/stm32_pinmap.h: ########## @@ -34,7 +34,11 @@ /* STM32L15xx family */ Review Comment: missing pragma warning that a legacy pinmap is in use ########## arch/arm/src/stm32l4/hardware/stm32l4_pinmap.h: ########## @@ -27,17 +27,30 @@ #include <nuttx/config.h> #include "chip.h" - -#if defined(CONFIG_STM32L4_STM32L4X3) -# include "hardware/stm32l4x3xx_pinmap.h" -#elif defined(CONFIG_STM32L4_STM32L4X5) -# include "hardware/stm32l4x5xx_pinmap.h" -#elif defined(CONFIG_STM32L4_STM32L4X6) -# include "hardware/stm32l4x6xx_pinmap.h" -#elif defined(CONFIG_STM32L4_STM32L4XR) -# include "hardware/stm32l4xrxx_pinmap.h" +#if defined(CONFIG_STM32L4_USE_LEGACY_PINMAP) +# if defined(CONFIG_STM32L4_STM32L4X3) Review Comment: missing pragma warning ########## tools/stm32_pinmap_tool.py: ########## @@ -0,0 +1,345 @@ +#!/usr/bin/env python3 +############################################################################ Review Comment: will you change it to the Apache header ? ########## tools/stm32_pinmap_tool.py: ########## @@ -0,0 +1,345 @@ +#!/usr/bin/env python3 +############################################################################ +# +# Copyright (c) 2012-2017 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +# +# Serial firmware uploader for the PX4FMU bootloader Review Comment: looks like a comment from another tool ########## arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h: ########## @@ -0,0 +1,685 @@ +/**************************************************************************** + * arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h + * + * 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 __ARCH_ARM_SRC_STM32_HARDWARE_STM32F20XXX_PINMAP_LEGACY.H +#define __ARCH_ARM_SRC_STM32_HARDWARE_STM32F20XXX_PINMAP_LEGACY.H Review Comment: ```suggestion #ifndef __ARCH_ARM_SRC_STM32_HARDWARE_STM32F20XXX_PINMAP_LEGACY_H ``` here and in other places -- 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