nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] hartmannathan commented on a change in pull request #1051: [DO NOT MERGE] Add support for STM32G474 family
Date Sun, 17 May 2020 22:57:30 GMT

hartmannathan commented on a change in pull request #1051:
URL: https://github.com/apache/incubator-nuttx/pull/1051#discussion_r426314348



##########
File path: arch/arm/src/stm32/hardware/stm32g47xxx_pinmap.h
##########
@@ -0,0 +1,2627 @@
+/****************************************************************************************************
+ *  arch/arm/src/stm32/hardware/stm32g47xxx_pinmap.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_STM32G47XXX_PINMAP_H
+#define __ARCH_ARM_SRC_STM32_HARDWARE_STM32G47XXX_PINMAP_H
+
+/****************************************************************************************************
+ * Included Files
+ ****************************************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "stm32_gpio.h"
+
+/****************************************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************************************/
+
+/* Alternate Pin Functions.  All members of the STM32G47xxx family share the
+ * same pin multiplexing (although they differ in the pins physically
+ * available).
+ *
+ * Alternative pin selections are provided with a numeric suffix like _1, _2,
+ * etc.  Drivers, however, will use the pin selection without the numeric
+ * suffix.  Additional definitions are required in the board.h file.  For
+ * example, if CAN1_RX connects via PA11 on some board, then the following
+ * definitions should appear in the board.h header file for that board:
+ *
+ * #define GPIO_CAN1_RX GPIO_CAN1_RX_1
+ *
+ * The driver will then automatically configure PA11 as the CAN1 RX pin.
+ */
+
+/* WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
+ * Additional effort is required to select specific GPIO options such as
+ * frequency, open-drain/push-pull, and pull-up/down!  Just the basics are
+ * defined for most pins in this file.
+ */
+
+/* ADC - Analog Digital Converter *******************************************************************/
+
+/* ADC1 has IN1-IN5, IN10-IN12, IN14-IN15 on all STM32G474(C-M-Q-R-V)xxx P/Ns
+ * and also has IN6-9 on STM32G474(M-Q-R-V)xxx P/Ns:
+ */
+
+#define GPIO_ADC1_IN1                  (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN0)
+#define GPIO_ADC1_IN2                  (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN1)
+#define GPIO_ADC1_IN3                  (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN2)
+#define GPIO_ADC1_IN4                  (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN3)
+#define GPIO_ADC1_IN5                  (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN14)
+#define GPIO_ADC1_IN10                 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN0)
+#define GPIO_ADC1_IN11                 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN12)
+#define GPIO_ADC1_IN12                 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN1)
+#define GPIO_ADC1_IN14                 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN11)
+#define GPIO_ADC1_IN15                 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN0)
+
+#if defined(CONFIG_ARCH_CHIP_STM32G474M) || \

Review comment:
       I went ahead and made this change in cc206e81b3b3d920c8031c025cbf6a368325febc. The
pinmap is much simplified.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message