Skip to content

Commit 4bd644e

Browse files
committed
[PinMap] Add WEAK attribute to PinMap arrays
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 719b7d0 commit 4bd644e

File tree

862 files changed

+13259
-14397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

862 files changed

+13259
-14397
lines changed

src/genpinmap/Arduino/STM32F030C6Tx/PeripheralPins.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//*** ADC ***
2424

2525
#ifdef HAL_ADC_MODULE_ENABLED
26-
const PinMap PinMap_ADC[] = {
26+
WEAK const PinMap PinMap_ADC[] = {
2727
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
2828
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
2929
{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
@@ -43,7 +43,7 @@ const PinMap PinMap_ADC[] = {
4343
//*** I2C ***
4444

4545
#ifdef HAL_I2C_MODULE_ENABLED
46-
const PinMap PinMap_I2C_SDA[] = {
46+
WEAK const PinMap PinMap_I2C_SDA[] = {
4747
{PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
4848
{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
4949
{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
@@ -54,7 +54,7 @@ const PinMap PinMap_I2C_SDA[] = {
5454
#endif
5555

5656
#ifdef HAL_I2C_MODULE_ENABLED
57-
const PinMap PinMap_I2C_SCL[] = {
57+
WEAK const PinMap PinMap_I2C_SCL[] = {
5858
{PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
5959
{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
6060
{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
@@ -67,7 +67,7 @@ const PinMap PinMap_I2C_SCL[] = {
6767
//*** PWM ***
6868

6969
#ifdef HAL_TIM_MODULE_ENABLED
70-
const PinMap PinMap_PWM[] = {
70+
WEAK const PinMap PinMap_PWM[] = {
7171
{PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
7272
{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
7373
{PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
@@ -100,7 +100,7 @@ const PinMap PinMap_PWM[] = {
100100
//*** SERIAL ***
101101

102102
#ifdef HAL_UART_MODULE_ENABLED
103-
const PinMap PinMap_UART_TX[] = {
103+
WEAK const PinMap PinMap_UART_TX[] = {
104104
{PA_2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
105105
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
106106
{PA_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
@@ -110,7 +110,7 @@ const PinMap PinMap_UART_TX[] = {
110110
#endif
111111

112112
#ifdef HAL_UART_MODULE_ENABLED
113-
const PinMap PinMap_UART_RX[] = {
113+
WEAK const PinMap PinMap_UART_RX[] = {
114114
{PA_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
115115
{PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
116116
{PA_15, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
@@ -120,15 +120,15 @@ const PinMap PinMap_UART_RX[] = {
120120
#endif
121121

122122
#ifdef HAL_UART_MODULE_ENABLED
123-
const PinMap PinMap_UART_RTS[] = {
123+
WEAK const PinMap PinMap_UART_RTS[] = {
124124
{PA_1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
125125
{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
126126
{NC, NP, 0}
127127
};
128128
#endif
129129

130130
#ifdef HAL_UART_MODULE_ENABLED
131-
const PinMap PinMap_UART_CTS[] = {
131+
WEAK const PinMap PinMap_UART_CTS[] = {
132132
{PA_0, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
133133
{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
134134
{NC, NP, 0}
@@ -138,7 +138,7 @@ const PinMap PinMap_UART_CTS[] = {
138138
//*** SPI ***
139139

140140
#ifdef HAL_SPI_MODULE_ENABLED
141-
const PinMap PinMap_SPI_MOSI[] = {
141+
WEAK const PinMap PinMap_SPI_MOSI[] = {
142142
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
143143
{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
144144
{PB_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
@@ -147,7 +147,7 @@ const PinMap PinMap_SPI_MOSI[] = {
147147
#endif
148148

149149
#ifdef HAL_SPI_MODULE_ENABLED
150-
const PinMap PinMap_SPI_MISO[] = {
150+
WEAK const PinMap PinMap_SPI_MISO[] = {
151151
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
152152
{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
153153
{PB_14, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
@@ -156,7 +156,7 @@ const PinMap PinMap_SPI_MISO[] = {
156156
#endif
157157

158158
#ifdef HAL_SPI_MODULE_ENABLED
159-
const PinMap PinMap_SPI_SCLK[] = {
159+
WEAK const PinMap PinMap_SPI_SCLK[] = {
160160
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
161161
{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
162162
{PB_13, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
@@ -165,7 +165,7 @@ const PinMap PinMap_SPI_SCLK[] = {
165165
#endif
166166

167167
#ifdef HAL_SPI_MODULE_ENABLED
168-
const PinMap PinMap_SPI_SSEL[] = {
168+
WEAK const PinMap PinMap_SPI_SSEL[] = {
169169
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
170170
{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
171171
{PB_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},

src/genpinmap/Arduino/STM32F030C8Tx/PeripheralPins.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//*** ADC ***
2424

2525
#ifdef HAL_ADC_MODULE_ENABLED
26-
const PinMap PinMap_ADC[] = {
26+
WEAK const PinMap PinMap_ADC[] = {
2727
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
2828
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
2929
{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
@@ -43,7 +43,7 @@ const PinMap PinMap_ADC[] = {
4343
//*** I2C ***
4444

4545
#ifdef HAL_I2C_MODULE_ENABLED
46-
const PinMap PinMap_I2C_SDA[] = {
46+
WEAK const PinMap PinMap_I2C_SDA[] = {
4747
{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
4848
{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
4949
{PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
@@ -53,7 +53,7 @@ const PinMap PinMap_I2C_SDA[] = {
5353
#endif
5454

5555
#ifdef HAL_I2C_MODULE_ENABLED
56-
const PinMap PinMap_I2C_SCL[] = {
56+
WEAK const PinMap PinMap_I2C_SCL[] = {
5757
{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
5858
{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
5959
{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C2)},
@@ -65,7 +65,7 @@ const PinMap PinMap_I2C_SCL[] = {
6565
//*** PWM ***
6666

6767
#ifdef HAL_TIM_MODULE_ENABLED
68-
const PinMap PinMap_PWM[] = {
68+
WEAK const PinMap PinMap_PWM[] = {
6969
{PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
7070
{PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
7171
{PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
@@ -103,7 +103,7 @@ const PinMap PinMap_PWM[] = {
103103
//*** SERIAL ***
104104

105105
#ifdef HAL_UART_MODULE_ENABLED
106-
const PinMap PinMap_UART_TX[] = {
106+
WEAK const PinMap PinMap_UART_TX[] = {
107107
{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
108108
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
109109
{PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
@@ -113,7 +113,7 @@ const PinMap PinMap_UART_TX[] = {
113113
#endif
114114

115115
#ifdef HAL_UART_MODULE_ENABLED
116-
const PinMap PinMap_UART_RX[] = {
116+
WEAK const PinMap PinMap_UART_RX[] = {
117117
{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
118118
{PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
119119
{PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
@@ -123,15 +123,15 @@ const PinMap PinMap_UART_RX[] = {
123123
#endif
124124

125125
#ifdef HAL_UART_MODULE_ENABLED
126-
const PinMap PinMap_UART_RTS[] = {
126+
WEAK const PinMap PinMap_UART_RTS[] = {
127127
{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
128128
{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
129129
{NC, NP, 0}
130130
};
131131
#endif
132132

133133
#ifdef HAL_UART_MODULE_ENABLED
134-
const PinMap PinMap_UART_CTS[] = {
134+
WEAK const PinMap PinMap_UART_CTS[] = {
135135
{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
136136
{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
137137
{NC, NP, 0}
@@ -141,7 +141,7 @@ const PinMap PinMap_UART_CTS[] = {
141141
//*** SPI ***
142142

143143
#ifdef HAL_SPI_MODULE_ENABLED
144-
const PinMap PinMap_SPI_MOSI[] = {
144+
WEAK const PinMap PinMap_SPI_MOSI[] = {
145145
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
146146
{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
147147
{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
@@ -150,7 +150,7 @@ const PinMap PinMap_SPI_MOSI[] = {
150150
#endif
151151

152152
#ifdef HAL_SPI_MODULE_ENABLED
153-
const PinMap PinMap_SPI_MISO[] = {
153+
WEAK const PinMap PinMap_SPI_MISO[] = {
154154
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
155155
{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
156156
{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
@@ -159,7 +159,7 @@ const PinMap PinMap_SPI_MISO[] = {
159159
#endif
160160

161161
#ifdef HAL_SPI_MODULE_ENABLED
162-
const PinMap PinMap_SPI_SCLK[] = {
162+
WEAK const PinMap PinMap_SPI_SCLK[] = {
163163
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
164164
{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
165165
{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
@@ -168,7 +168,7 @@ const PinMap PinMap_SPI_SCLK[] = {
168168
#endif
169169

170170
#ifdef HAL_SPI_MODULE_ENABLED
171-
const PinMap PinMap_SPI_SSEL[] = {
171+
WEAK const PinMap PinMap_SPI_SSEL[] = {
172172
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
173173
{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
174174
{PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},

src/genpinmap/Arduino/STM32F030CCTx/PeripheralPins.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//*** ADC ***
2424

2525
#ifdef HAL_ADC_MODULE_ENABLED
26-
const PinMap PinMap_ADC[] = {
26+
WEAK const PinMap PinMap_ADC[] = {
2727
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
2828
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
2929
{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2
@@ -43,7 +43,7 @@ const PinMap PinMap_ADC[] = {
4343
//*** I2C ***
4444

4545
#ifdef HAL_I2C_MODULE_ENABLED
46-
const PinMap PinMap_I2C_SDA[] = {
46+
WEAK const PinMap PinMap_I2C_SDA[] = {
4747
{PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
4848
{PA_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
4949
{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
@@ -56,7 +56,7 @@ const PinMap PinMap_I2C_SDA[] = {
5656
#endif
5757

5858
#ifdef HAL_I2C_MODULE_ENABLED
59-
const PinMap PinMap_I2C_SCL[] = {
59+
WEAK const PinMap PinMap_I2C_SCL[] = {
6060
{PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
6161
{PA_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C2)},
6262
{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
@@ -71,7 +71,7 @@ const PinMap PinMap_I2C_SCL[] = {
7171
//*** PWM ***
7272

7373
#ifdef HAL_TIM_MODULE_ENABLED
74-
const PinMap PinMap_PWM[] = {
74+
WEAK const PinMap PinMap_PWM[] = {
7575
{PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
7676
{PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
7777
{PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
@@ -110,7 +110,7 @@ const PinMap PinMap_PWM[] = {
110110
//*** SERIAL ***
111111

112112
#ifdef HAL_UART_MODULE_ENABLED
113-
const PinMap PinMap_UART_TX[] = {
113+
WEAK const PinMap PinMap_UART_TX[] = {
114114
{PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
115115
{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
116116
{PA_4, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_USART6)},
@@ -124,7 +124,7 @@ const PinMap PinMap_UART_TX[] = {
124124
#endif
125125

126126
#ifdef HAL_UART_MODULE_ENABLED
127-
const PinMap PinMap_UART_RX[] = {
127+
WEAK const PinMap PinMap_UART_RX[] = {
128128
{PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
129129
{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
130130
{PA_5, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_USART6)},
@@ -138,7 +138,7 @@ const PinMap PinMap_UART_RX[] = {
138138
#endif
139139

140140
#ifdef HAL_UART_MODULE_ENABLED
141-
const PinMap PinMap_UART_RTS[] = {
141+
WEAK const PinMap PinMap_UART_RTS[] = {
142142
{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
143143
{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
144144
{PA_15, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
@@ -150,7 +150,7 @@ const PinMap PinMap_UART_RTS[] = {
150150
#endif
151151

152152
#ifdef HAL_UART_MODULE_ENABLED
153-
const PinMap PinMap_UART_CTS[] = {
153+
WEAK const PinMap PinMap_UART_CTS[] = {
154154
{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
155155
{PA_6, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
156156
{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
@@ -163,7 +163,7 @@ const PinMap PinMap_UART_CTS[] = {
163163
//*** SPI ***
164164

165165
#ifdef HAL_SPI_MODULE_ENABLED
166-
const PinMap PinMap_SPI_MOSI[] = {
166+
WEAK const PinMap PinMap_SPI_MOSI[] = {
167167
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
168168
{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
169169
{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
@@ -172,7 +172,7 @@ const PinMap PinMap_SPI_MOSI[] = {
172172
#endif
173173

174174
#ifdef HAL_SPI_MODULE_ENABLED
175-
const PinMap PinMap_SPI_MISO[] = {
175+
WEAK const PinMap PinMap_SPI_MISO[] = {
176176
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
177177
{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
178178
{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
@@ -181,7 +181,7 @@ const PinMap PinMap_SPI_MISO[] = {
181181
#endif
182182

183183
#ifdef HAL_SPI_MODULE_ENABLED
184-
const PinMap PinMap_SPI_SCLK[] = {
184+
WEAK const PinMap PinMap_SPI_SCLK[] = {
185185
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
186186
{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
187187
{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
@@ -191,7 +191,7 @@ const PinMap PinMap_SPI_SCLK[] = {
191191
#endif
192192

193193
#ifdef HAL_SPI_MODULE_ENABLED
194-
const PinMap PinMap_SPI_SSEL[] = {
194+
WEAK const PinMap PinMap_SPI_SSEL[] = {
195195
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
196196
{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
197197
{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},

0 commit comments

Comments
 (0)