stm32h7:pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings. This is board dependent. This change adds CONFIG_STM32H7_USE_LEGACY_PINMAP to allow for lazy migration to using pinmaps without speeds. The work required to do this can be aided by running tools/stm32_pinmap_tool.py. The tools will take a board.h file and a legacy pinmap and outut the required changes that one needs to make to a board.h file. Eventually, STM32H7_USE_LEGACY_PINMAP will be deprecated and the legacy pinmaps removed from NuttX. Any new boards added should set STM32H7_USE_LEGACY_PINMAP=n and fully define the pins in board.h
This commit is contained in:
parent
c5f7620c42
commit
14a0e08386
@ -944,6 +944,26 @@ config STM32H7_UART8
|
|||||||
endmenu # STM32H7 U[S]ART Selection
|
endmenu # STM32H7 U[S]ART Selection
|
||||||
endmenu # STM32H7 Peripheral Selection
|
endmenu # STM32H7 Peripheral Selection
|
||||||
|
|
||||||
|
config STM32H7_USE_LEGACY_PINMAP
|
||||||
|
bool "Use the legacy pinmap with GPIO_SPEED_xxx included."
|
||||||
|
default y
|
||||||
|
---help---
|
||||||
|
In the past, pinmap files included GPIO_SPEED_xxxMhz. These speed
|
||||||
|
settings should have come from the board.h as it describes the wiring
|
||||||
|
of the SoC to the board. The speed is really slew rate control and
|
||||||
|
therefore is related to the layout and can only be properly set
|
||||||
|
in board.h.
|
||||||
|
|
||||||
|
STM32H7_USE_LEGACY_PINMAP is provided, to allow lazy migration to
|
||||||
|
using pinmaps without speeds. The work required to do this can be aided
|
||||||
|
by running tools/stm32_pinmap_tool.py. The tools will take a board.h
|
||||||
|
file and a legacy pinmap and output the required changes that one needs
|
||||||
|
to make to a board.h file.
|
||||||
|
|
||||||
|
Eventually, STM32H7_USE_LEGACY_PINMAP will be deprecated and the legacy
|
||||||
|
pinmaps removed from NuttX. Any new boards added should set
|
||||||
|
STM32H7_USE_LEGACY_PINMAP=n and fully define the pins in board.h
|
||||||
|
|
||||||
config STM32H7_SYSCFG_IOCOMPENSATION
|
config STM32H7_SYSCFG_IOCOMPENSATION
|
||||||
bool "SYSCFG I/O Compensation"
|
bool "SYSCFG I/O Compensation"
|
||||||
default n
|
default n
|
||||||
|
@ -28,6 +28,17 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32H7_USE_LEGACY_PINMAP)
|
||||||
|
# if defined(CONFIG_STM32H7_STM32H7X3XX)
|
||||||
|
# include "hardware/stm32h7x3xx_pinmap_legacy.h"
|
||||||
|
# elif defined(CONFIG_STM32H7_STM32H7B3XX)
|
||||||
|
# include "hardware/stm32h7x3xx_pinmap_legacy.h"
|
||||||
|
# elif defined(CONFIG_STM32H7_STM32H7X7XX)
|
||||||
|
# include "hardware/stm32h7x3xx_pinmap_legacy.h"
|
||||||
|
# else
|
||||||
|
# error "Unsupported STM32 H7 Pin map"
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
# if defined(CONFIG_STM32H7_STM32H7X3XX)
|
# if defined(CONFIG_STM32H7_STM32H7X3XX)
|
||||||
# include "hardware/stm32h7x3xx_pinmap.h"
|
# include "hardware/stm32h7x3xx_pinmap.h"
|
||||||
# elif defined(CONFIG_STM32H7_STM32H7B3XX)
|
# elif defined(CONFIG_STM32H7_STM32H7B3XX)
|
||||||
@ -37,5 +48,6 @@
|
|||||||
# else
|
# else
|
||||||
# error "Unsupported STM32 H7 Pin map"
|
# error "Unsupported STM32 H7 Pin map"
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ARCH_ARM_SRC_STM32H7_HARDWARE_STM32_PINMAP_H */
|
#endif /* __ARCH_ARM_SRC_STM32H7_HARDWARE_STM32_PINMAP_H */
|
||||||
|
File diff suppressed because it is too large
Load Diff
1536
arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h
Normal file
1536
arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap_legacy.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -43,6 +43,10 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_STM32H7_STM32H7X3XX) || defined(CONFIG_STM32H7_STM32H7X7XX) || defined(CONFIG_STM32H7_STM32H7B3XX)
|
#if defined(CONFIG_STM32H7_STM32H7X3XX) || defined(CONFIG_STM32H7_STM32H7X7XX) || defined(CONFIG_STM32H7_STM32H7B3XX)
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32H7_USE_LEGACY_PINMAP)
|
||||||
|
# pragma message "CONFIG_STM32H7_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py"
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user