File tree 1 file changed +24
-0
lines changed
libraries/SrcWrapper/src/stm32
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 17
17
#include "pinmap.h"
18
18
#include "pinconfig.h"
19
19
#include "stm32yyxx_ll_gpio.h"
20
+ #include "stm32yyxx_ll_system.h"
20
21
21
22
#if defined(STM32MP1xx )
22
23
#include "lock_resource.h"
@@ -71,6 +72,29 @@ void pin_function(PinName pin, int function)
71
72
Error_Handler ();
72
73
}
73
74
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
+
74
98
/* Enable GPIO clock */
75
99
GPIO_TypeDef * gpio = set_GPIO_Port_Clock (port );
76
100
You can’t perform that action at this time.
0 commit comments