Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 6 | ||
---|---|---|---|
Line 191... | Line 191... | ||
191 | /* Get current io position */ |
191 | /* Get current io position */ |
192 | currentpin = (GPIO_InitStruct->Pin) & (0x00000001uL << pinpos); |
192 | currentpin = (GPIO_InitStruct->Pin) & (0x00000001uL << pinpos); |
193 | 193 | ||
194 | if (currentpin != 0x00u) |
194 | if (currentpin != 0x00u) |
195 | { |
195 | { |
196 | /* Pin Mode configuration */ |
- | |
197 | LL_GPIO_SetPinMode(GPIOx, currentpin, GPIO_InitStruct->Mode); |
- | |
198 | - | ||
199 | if ((GPIO_InitStruct->Mode == LL_GPIO_MODE_OUTPUT) || (GPIO_InitStruct->Mode == LL_GPIO_MODE_ALTERNATE)) |
196 | if ((GPIO_InitStruct->Mode == LL_GPIO_MODE_OUTPUT) || (GPIO_InitStruct->Mode == LL_GPIO_MODE_ALTERNATE)) |
200 | { |
197 | { |
201 | /* Check Speed mode parameters */ |
198 | /* Check Speed mode parameters */ |
202 | assert_param(IS_LL_GPIO_SPEED(GPIO_InitStruct->Speed)); |
199 | assert_param(IS_LL_GPIO_SPEED(GPIO_InitStruct->Speed)); |
203 | 200 | ||
204 | /* Speed mode configuration */ |
201 | /* Speed mode configuration */ |
205 | LL_GPIO_SetPinSpeed(GPIOx, currentpin, GPIO_InitStruct->Speed); |
202 | LL_GPIO_SetPinSpeed(GPIOx, currentpin, GPIO_InitStruct->Speed); |
- | 203 | ||
- | 204 | /* Check Output mode parameters */ |
|
- | 205 | assert_param(IS_LL_GPIO_OUTPUT_TYPE(GPIO_InitStruct->OutputType)); |
|
- | 206 | ||
- | 207 | /* Output mode configuration*/ |
|
- | 208 | LL_GPIO_SetPinOutputType(GPIOx, GPIO_InitStruct->Pin, GPIO_InitStruct->OutputType); |
|
206 | } |
209 | } |
207 | 210 | ||
208 | /* Pull-up Pull down resistor configuration*/ |
211 | /* Pull-up Pull down resistor configuration*/ |
209 | LL_GPIO_SetPinPull(GPIOx, currentpin, GPIO_InitStruct->Pull); |
212 | LL_GPIO_SetPinPull(GPIOx, currentpin, GPIO_InitStruct->Pull); |
210 | 213 | ||
Line 221... | Line 224... | ||
221 | else |
224 | else |
222 | { |
225 | { |
223 | LL_GPIO_SetAFPin_8_15(GPIOx, currentpin, GPIO_InitStruct->Alternate); |
226 | LL_GPIO_SetAFPin_8_15(GPIOx, currentpin, GPIO_InitStruct->Alternate); |
224 | } |
227 | } |
225 | } |
228 | } |
- | 229 | ||
- | 230 | /* Pin Mode configuration */ |
|
- | 231 | LL_GPIO_SetPinMode(GPIOx, currentpin, GPIO_InitStruct->Mode); |
|
226 | } |
232 | } |
227 | pinpos++; |
233 | pinpos++; |
228 | } |
234 | } |
229 | 235 | ||
230 | if ((GPIO_InitStruct->Mode == LL_GPIO_MODE_OUTPUT) || (GPIO_InitStruct->Mode == LL_GPIO_MODE_ALTERNATE)) |
- | |
231 | { |
- | |
232 | /* Check Output mode parameters */ |
- | |
233 | assert_param(IS_LL_GPIO_OUTPUT_TYPE(GPIO_InitStruct->OutputType)); |
- | |
234 | - | ||
235 | /* Output mode configuration*/ |
- | |
236 | LL_GPIO_SetPinOutputType(GPIOx, GPIO_InitStruct->Pin, GPIO_InitStruct->OutputType); |
- | |
237 | - | ||
238 | } |
- | |
239 | return (SUCCESS); |
236 | return (SUCCESS); |
240 | } |
237 | } |
241 | 238 | ||
242 | /** |
239 | /** |
243 | * @brief Set each @ref LL_GPIO_InitTypeDef field to default value. |
240 | * @brief Set each @ref LL_GPIO_InitTypeDef field to default value. |