Skip to content

!arch: unify all STM32 ports public API - #19125

Merged
xiaoxiang781216 merged 7 commits into
apache:masterfrom
raiden00pl:stm32_refactor_all_pr6
Jun 13, 2026
Merged

xiaoxiang781216 merged 7 commits into
apache:masterfrom
raiden00pl:stm32_refactor_all_pr6

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

Summary

Public API names were normalized to stm32_* equivalents (including timer/lptimer/dma/freerun API-facing types).
Also the root family header was renamed from stm32<family_prefix>.h to cannonical stm32.h.

The biggest changes affect stm32l4 and all later ports that were based on it (stm32l5, stm32wb, stm32wl5). The rest of the ports created an API without any rules; some functions had a family prefix in their name, some didn't. It wasn't even consistent within the same family. From now on, all ports use the same API names starting with "stm32_*". No more confusion about whether to use a prefix or not, and no more problems when porting code from one stm32 board to another.

This is a necessary step to create a common board for all STM32 and to generalize peripheral drivers.

Part of #19004

Impact

BREAKING CHANGE: Public STM32 interfaces for F7, H5, H7, L4, L5, WB, WL5 were renamed from stm32<family_prefix>_* forms to canonical stm32_* forms across arch and board headers/sources.

Migration to the new API is simple and comes down to replacing the name with a prefix with the name without a prefix, for example "stm32l4_" -> "stm32_", and change includes from "stm32l4.h" to "stm32.h"

Testing

CI

BREAKING CHANGE: Public STM32F7 APIs were renamed from stm32f7_*
and stm32f7x9_* forms to canonical stm32_* names.

Signed-off-by: raiden00pl <[email protected]>
BREAKING CHANGE: Public STM32H5 APIs were renamed from stm32h5_*
forms to canonical stm32_* forms.

Signed-off-by: raiden00pl <[email protected]>
BREAKING CHANGE: Public STM32H7 APIs were renamed from stm32h7_*
forms to canonical stm32_* forms.

Signed-off-by: raiden00pl <[email protected]>
@raiden00pl raiden00pl added the breaking change This change requires a mitigation entry in the release notes. label Jun 12, 2026
@github-actions github-actions Bot added Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: arm and removed breaking change This change requires a mitigation entry in the release notes. labels Jun 12, 2026
BREAKING CHANGE: Public STM32L4 interfaces were renamed from stm32l4_* forms to
canonical stm32_* forms across arch and board headers/sources.

Public type names were normalized to stm32_*
equivalents (including timer/lptimer/dma/freerun API-facing types), and
stm32l4can_initialize() was renamed to stm32_caninitialize().

The STM32L4 root family header was renamed from stm32l4.h to stm32.h;
all STM32L4 arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <[email protected]>
BREAKING CHANGE: Public STM32L5 interfaces were renamed from stm32l5_* forms
to canonical stm32_* forms across arch and board headers/sources.

Public type names in STM32L5 timer/GPIO/EXTI and related API-facing
declarations were normalized to stm32_* equivalents.

The STM32L5 root family header was renamed from stm32l5.h to stm32.h;
all STM32L5 arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <[email protected]>
BREAKING CHANGE: Public STM32WB interfaces were renamed from stm32wb_*
forms to canonical stm32_* forms across arch and board headers/sources.

Public type names in STM32WB timer/dma/freerun/oneshot/GPIO/EXTI and
related API-facing declarations were normalized to stm32_* equivalents.

The STM32WB root family header was renamed from stm32wb.h to stm32.h;
all STM32WB arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <[email protected]>
BREAKING CHANGE: Public STM32WL5 interfaces were renamed from stm32wl5_*
forms to canonical stm32_* forms across arch and board headers/sources.

Public type names in STM32WL5 timer/GPIO/EXTI and related API-facing
declarations were normalized to stm32_* equivalents.

The STM32WL5 root family header was renamed from stm32wl5.h to stm32.h;
all STM32WL5 arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <[email protected]>
@raiden00pl
raiden00pl force-pushed the stm32_refactor_all_pr6 branch from 11339f1 to e71e8fd Compare June 12, 2026 07:46
@acassis

acassis commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

That was a HUGE work! Congratulations @raiden00pl to this call for duty! Kudos!!!

@xiaoxiang781216
xiaoxiang781216 merged commit 80312db into apache:master Jun 13, 2026
41 checks passed
@raiden00pl
raiden00pl deleted the stm32_refactor_all_pr6 branch June 13, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues Board: arm Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants