chore: use LL GPIO pull configuration#2947
Open
fpistm wants to merge 3 commits intostm32duino:mainfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates GPIO pull configuration usage to STM32 LL (Low-Layer) pull constants across variants pin maps and core libraries, and adjusts the pull configuration helper to align with LL semantics.
Changes:
- Replaced
GPIO_*PULL*constants withLL_GPIO_PULL_*in multiplePeripheralPins.cvariant pin maps. - Updated core libraries (Wire, USBDevice, SPI, Arduino core) to configure pulls using LL constants.
- Updated
pin_PullConfig()implementation and thestm32variant.pygenerator defaults to emit LL pull constants.
Reviewed changes
Copilot reviewed 37 out of 759 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| variants/STM32C0xx/C071G(8-B)UxN/PeripheralPins.c | Migrate variant pin map pulls to LL pull constants (ADC/I2C/TIM/UART/SPI/USB). |
| variants/STM32C0xx/C071F8P_C071FB(P-Y)/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C071F(8-B)PxN/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C051D8Y_C051F(6-8)P/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C031K(4-6)(T-U)/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C031G(4-6)U/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C031F(4-6)P/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C011J(4-6)M/PeripheralPins.c | Same LL pull migration for this package variant. |
| variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/PeripheralPins.c | Same LL pull migration for this package variant. |
| libraries/Wire/src/utility/twi.c | Use LL pull constant when resetting I2C pins to analog. |
| libraries/USBDevice/src/usbd_if.c | Use LL pull constant for USB re-enumeration pullup control pin configuration. |
| libraries/SrcWrapper/inc/pinconfig.h | Refactor pin_PullConfig() to use LL pull constants and handle STM32F1 floating vs pull modes. |
| libraries/SPI/src/utility/spi_com.c | Use LL pull constants when biasing SCK according to SPI polarity. |
| cores/arduino/wiring_digital.c | Use LL pull constants for pinMode() configurations. |
| cores/arduino/Tone.cpp | Use LL pull constant when configuring/deconfiguring the tone pin. |
| CI/update/stm32variant.py | Update generator defaults to emit LL pull constants in generated pin maps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
with LL GPIO pull config except STM32F1xx. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.