File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
libraries/SrcWrapper/src/stm32 Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1717#include "pinmap.h"
1818#include "pinconfig.h"
1919#include "stm32yyxx_ll_gpio.h"
20+ #include "stm32yyxx_ll_system.h"
2021
2122#if defined(STM32MP1xx )
2223#include "lock_resource.h"
@@ -71,6 +72,29 @@ void pin_function(PinName pin, int function)
7172 Error_Handler ();
7273 }
7374
75+ /* Handle pin remap if any */
76+ #if defined(LL_SYSCFG_PIN_RMP_PA11 ) && defined(LL_SYSCFG_PIN_RMP_PA12 )
77+ if ((pin >= PA_9 ) && (pin <= PA_12 )) {
78+ __HAL_RCC_SYSCFG_CLK_ENABLE ();
79+ switch ((int )pin ) {
80+ case PA_9 :
81+ LL_SYSCFG_EnablePinRemap (LL_SYSCFG_PIN_RMP_PA11 );
82+ break ;
83+ case PA_11 :
84+ LL_SYSCFG_DisablePinRemap (LL_SYSCFG_PIN_RMP_PA11 );
85+ break ;
86+ case PA_10 :
87+ LL_SYSCFG_EnablePinRemap (LL_SYSCFG_PIN_RMP_PA12 );
88+ break ;
89+ case PA_12 :
90+ LL_SYSCFG_DisablePinRemap (LL_SYSCFG_PIN_RMP_PA12 );
91+ break ;
92+ default :
93+ break ;
94+ }
95+ }
96+ #endif
97+
7498 /* Enable GPIO clock */
7599 GPIO_TypeDef * gpio = set_GPIO_Port_Clock (port );
76100
You can’t perform that action at this time.
0 commit comments